4 ms·
As a quick fiddle, dramatic results can be had with just changing the line: if((i%4)===1) A "1" means it favors green, obviously "0" would favor red and "2"
by moron4hire 13y ago
As a quick fiddle, dramatic results can be had with just changing the line:
if((i%4)===1)
A "1" means it favors green, obviously "0" would favor red and "2" would favor blue. There is a 4th component for alpha channel, but I personally haven't gotten too far into the fitness function finangling to decide if it is useful.
This was motivated by the ludicrously over-complicated genetic algorithm example in https://news.ycombinator.com/item?id=5904182 https://news.ycombinator.com/item?id=5904182
While they do require finesse in their configuration, genetic algorithms do not have to be terribly complex in code.