Example of Maze Sim

Algorithm for maze generation: A random start and end are selected. Each of them is marked, and set as an empty space. Then, a block touching the start point is selected as the next empty space. Every time a block is marked as an empty space, it spreads the emptiness either randomly (rarely) or in the direction the spread had been traveling. If it selects a non existant block to spread to, it spreads to the first existing block it finds that it is adjacent to. There is a small chance of dead ends, and branching. If a maze is generated that is still unsolvable (due to all being dead ends), it is discarded, and the system will try up to 9 times more (usually takes less than 5)

Algorithm for creature movement: Creatures generate random strings containing any of "LRDU" with L being "Left" and so on. Creatures follow these strings mindlessly untill their generation is up. At the end of their generation, the creatures who got to the goal fastest (or who were the closest absolute distance to the goal) are allowed to breed the next generation. Basic genetic algorithm, really. The creatures are colored based on their movement strings: Left is their blue value, Right is their green value, and Up and Down are combined to make their red value. Because the strings are random, most creatures end up grayish.