Similar story...<p>My senior year in high school I got hooked on an online multiplayer Tetris game called TetriNET. I eventually created a pretty sophisticated bot to play for me, which absolutely crushed the games. A friend recommended I submit it for consideration in the regional science fair, where I wound up taking first in the computer science category.<p>Lots of details on the blog [1], including screenshots, source code, and details of the algorithms used.<p>[1] <a href="http://www.mattmazur.com/2009/05/creating-a-tetrinet-bot/" rel="nofollow">http://www.mattmazur.com/2009/05/creating-a-tetrinet-bot/</a>
I would be interested to see whether a genetic algorithm performs better than a hill-climbing one in this context. By hill-climbing I mean searching for a vector in the seven-dimensional space you've defined which makes the biggest improvement in the fitness function. I tend to think hill climbing would converge faster than evolution among random mutations.
I hate to be "that guy", but I'm somewhat confused why everyone online seems to be so obsessed with genetic algorithms. What they are is a kind of optimization technique, and one of the worst ones at that. (Genetic algorithms are what you resort to in the rare cases when no other optimization technique will work.)<p>As 'lincolnq said, standard hill-climbing would probably work much better for this kind of problem.<p>Still, cool results, I guess.
Population size of 16 is <i>way</i> too low : it's not surprising that he's getting premature convergence. Also, his mutation is huge : so his overall process is more like a directed random walk.<p>More reasonable parameters would be 100-1000 for the initial population, and +/- 2% on a parameter for mutations.
<a href="http://www.ryanheise.com/tetris/tetris_artificial_intelligence.html" rel="nofollow">http://www.ryanheise.com/tetris/tetris_artificial_intelligen...</a> here's one using Google's pagerank algorithm