Game The Algorithm The Game

GENOSAD

...or something equally edgy.
Joined
Aug 31, 2023
Messages
628
Reaction score
2,810
Awards
215
Website
genosadness.neocities.org
I've read the rules about 3 times and still don't understand them, so hopefully my contribution will emerge victorious.
Acephali_(Earth-619).png
 
Virtual Cafe Awards

big_ping07

Really Big
Joined
Mar 10, 2024
Messages
398
Reaction score
2,128
Awards
170
63136FE5-B5DB-4C08-A1DD-6FC036FAE2AF.jpeg

sorry on mobile webp file at first and there isn't supposed to be a black line at the bottom
 
Virtual Cafe Awards
Joined
Dec 16, 2021
Messages
438
Reaction score
2,710
Awards
183
Website
myspace.com
Virtual Cafe Awards
I've read the rules about 3 times and still don't understand them, so hopefully my contribution will emerge victorious.
View attachment 111585
13.12%
View attachment 111588
sorry on mobile webp file at first and there isn't supposed to be a black line at the bottom
78.929971%
I got you fam. Here's a version without the line. Let's see how the algorithm handles both versions
View attachment 111591
78.927114%
 
Virtual Cafe Awards

Ross_Я

Slacker
Joined
Oct 17, 2023
Messages
1,141
Reaction score
2,762
Awards
229
Website
www.youtube.com
I have a stupid idea that will probably fail horribly, but I want to see what percentage this solid color gets.
Heh, I was thinking about posting Malevich's Red Square as well, but, eh, had something more interesting to do.
 
Virtual Cafe Awards
HOW I HACKED FROM THE CHINESE FIREWALL TO POST ON AGORA!!! *NEW METHOD* *WORKING 2025* *NOT CLICKBAIT* *IN DA QINHAI*
maxresdefault.jpg

:/
The video requested is not available because the account accociated has been terminated.
 
Virtual Cafe Awards
Virtual Cafe Awards

Digital Cheese

Venith Emperor
Joined
Jun 6, 2023
Messages
466
Reaction score
1,966
Awards
164
Website
digitalcheese.xyz
>redditcostanzayeahrightsmirk,

Crack down on the Russian troll accounts, or you are an active part of the attack on Ukraine.

This is now a time of war.

If you host and distribute Russian propaganda, you are a tool of the invasion, and a tool of fascism.

This is an unprovoked attack on a peaceful nation.

Hosting comments, posts, or forums that condone or dismiss that attack is giving a mouthpiece to the kremlin's agenda.

slava ukraine
 
Virtual Cafe Awards
Thread is now finished! The top posts were...

@splashy
81.56%

@Arcensyl
89.95%

@mesaprotector
99.76%

Congratulations are in order for @№56 for working this out first.

Congratulations! The algorithm was:

R/R+G+B*100

So majority red images won out. Note that any other value on a pixel for green and blue deducted value from the score.

Note that Javascript really fucks up with the floating point errors, so the values are slightly different each time the code runs.

JavaScript:
// ==UserScript==
// @name         Algorithm game
// @namespace    http://tampermonkey.net/
// @version      2024-08-28
// @description  try to take over the world!
// @author       You
// @match        https://forum.agoraroad.com/index.php?threads/game-the-algorithm-the-game.*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=agoraroad.com
// @grant        none
// ==/UserScript==

(function() {
    let c = document.createElement("canvas");
    let ctx = c.getContext("2d");

    let imgs = document.querySelectorAll(".message-body img.bbImage");

    function Calc_Rating(img_id){
        let img = imgs[img_id];
        let running_total;
        if (img.src.includes("forum.agoraroad") ){
            c.width = img.width;
            c.height = img.height;
            ctx.drawImage(img,0,0);
            let data = ctx.getImageData(0,0,c.width,c.height);
            data = data.data;
            let pixel_count = 0;
            running_total = 0;
            for (let i = 0; i < data.length; i+=4){
                let R = data[i];
                let G = data[i+1];
                let B = data[i+2];
                let total = 0;
                total = R+G+B;
                if ( total > 0 ){
                    total = R / total*100;
                }else{
                    total = 0;
                }
                running_total += total;
                pixel_count++;
            }
            running_total = running_total / pixel_count;
        }else{
            running_total = "error - CORS";
        }
        let outputSpan = document.createElement("SPAN");
        outputSpan.innerText = running_total;
        img.insertAdjacentElement("beforebegin",outputSpan);
    }

    for ( let i = 0; i < imgs.length; i++ ){
        imgs[i].addEventListener("load", function(){
            Calc_Rating(i);
        });
    }

})();
 
Virtual Cafe Awards
Containment Chat
Rules Help Users
      Punp: Do I need mailchimp or something to send newsletters?