An Evolutionary Algorithm Applied To Cellular Automata
![]() Conway's Game Of Life. |
![]() A different ruleset. |
Download the program (For Windows) here. If there are issues, you may need to google the VB5 Runtimes and install them (most likely on older Windows versions.) Just put it in a folder and run it. It will create a "Species" subfolder.
Also available for download, a few sample species files. The VB5 source code is also available here.
This app uses an evolutionary algorithm to explore a cellular automaton. A cellular automaton uses a grid of cells. With each tick of the clock, every cell checks the status of its neighbors, compares this to the rules of the game, and then sets its own status based on those rules. Note that all cells follow the same rules. The edges are "wrapped" so that activity going off one side of the grid enters the other side.
Conway's Game Of Life is a particular "cellular automaton." The rules of "Game Of Life" are:
· If a cell is "on" and it has either 0-1 neighbors "on" or 4-8 neighbors "on" then it turns off.
· If a cell is "off" and has 3 neighbours "on" then turns itself on.
· (In all other cases it just stays as it is)
This program takes that type of cellular automaton, and evolves "interesting" rulesets. In this case, the default for "interesting" is defined as having 15% of cells "on" at any given time, and having 25% of cells change per tick. The user can change these.
![]() Main Screen |
![]() Progress Graph |
The evolutionary algorithm used here is the standard process: variations are selected for "fitness" and then
reproduced with occasional errors. Number of offspring produced is weighted based on fitness compared to its
competitors.
1st place = 5 offspring
2nd place = 4 offspring
3rd place = 3 offspring
4th place = 2 offspring
5th place = 2 offspring
6th place = 2 offspring
7th place = 2 offspring
8th place and lower = buhbye
A few improvements and changes were made for version 1.5:
· Symmetry fixed. It actually works as intended now.
· Load/Save features in the Species View screen.
· Directly manipulate a genotype in the Species View screen.
· "SW" icon added.
· Live Cam view is in Cyan.