Inspired by a conversation elsewhere, I’ve started working on a evolutionary computation project. The first goal is to illustrate how constructive neutral evolution works, although it may have other useful applications. I thought folks here might be interested in it as well.
Scenario: I’ve created a simple game for 1 or more ‘players’ who have to clear a room of targets/enemies. The actions of the players are encoded in a genome and are thus fully determined before the game begins. Player actions are followed in sequence until the room is cleared or until the end of the genome is reached. The score is the total number of successful hits on targets/enemies.
Available actions include ‘move 1 step’ and ‘attack’. Either action is accompanied by a direction: up/down/left/right.
Inspiration: The game was originally conceived as a simulation of the X-Men’s Danger Room, where the X-Men train to hone their superpowers and their teamwork. It makes the programming more fun for me, and perhaps it provides a nice hook for some. If you’re not familiar with the X-Men, you can just think of it as a game as described above.
What It Looks Like: Here is a 1 player version with a random genome. He starts in the lower right; his targets are the four pink/purple robots. Notice that he does not score any points but does lose most of his health.
Now we can mutate the genome and see if it produces a score as good or better for the player. If it does, we keep it and mutate again. If not, we go back to the prior genome and mutate it again. Via this adaptive evolution, we can get a genome that allows the player to get a perfect score.
Now so far, all we’ve demonstrated is yet another example of a genetic algorithm optimizing an objective function. What about neutral evolution?