A random initial population then evolves under the above rules until a steady state is reached. This can take a long time, on the order of 1000 iterations or more, because the rules are deliberately chosen to avoid premature extinction or overpopulation. While the gaming rules are simple, the evolution of the game often shows complex and interesting patterns. The following screenshot of the display shows a typical position:
The C source code of the game algorithm is shown below. The game board is represented as a large array, where shifts and adds are used to access the individual positions. One whole memory-word is used to store one bit of the game board; this representation wastes some memory, but allows watching the data in the memory editor during the program execution. For the same reason, shifts are used instead of multiplications. Naturally, shifts would also be a lot faster than multiplications on most low-end hardware.
Usage
Wait until the applet is loaded, then use the popup-menu (via popup > edit) to open the user-interface of the processor. Also, click on the symbol of the display (or use the popup again) to open the user-interface of the graphics display. Watch the evolution of the game positions.
The binary program running on the processor was compiled and linked with the GNU gcc (2.7.2.3) and binutils cross-compiler toolchain on a Linux x86 host, with the final ELF loading and relocation done via the Hades Elf2rom tool. See
Run the applet | Run the editor (via Webstart)