Genetic Algorithms and Debugging
This is my first time participating in on of these competitions, and I’m greatly enjoying it so far. I figured I’d write a blog post to summarize the first day here.
My game has you fight waves of randomly-generated enemy “bots”. When I say randomly-generated, I mean whole-hog random. Colors, behaviors, weapons, stats – it can all change. After the first set of enemies, I start using a genetic algorithm to combine these enemies, hopefully ramping up the difficulty and making some neat combinations.
Genetic algorithms are really cool and they suck at the same time. On the positive side, it’ll be easy to balance the game when the algorithm works right – if it keeps picking certain features over and over, I’ll nerf ’em. On the downside, it’s hard to tell if things aren’t working quite right. I played a few generations and noticed that the game kept dropping weapons for some reason. It would select out almost all weapons by the fourth generation. I was pretty sure this was not, in fact, the optimal solution to the problem. Turned out to be some misplaced curly braces (sheesh).
So what’s still to do? Sound and music, notably. A pause menu. I also think it would be pretty cool to have a system for exporting enemy genomes having friends fight them, or even having two bots fight each other.




















