( You need to enable Java to see this applet. )



Instructions: start clicking. Interesting things happen when the red guys hit non-black pixels. Try to keep your mouse moving, even when not clicking, as this influences the interaction.

This applet was inspired by "Core Wars", a game where programs are pit against each other inside a real or simulated computer memory and try to erase each other.

The red symbols deposited by mouse clicks are "automatons" that walk over the canvas, reading pixel values underneath them, and interpreting them as binary instructions. The instruction set recognized by each automaton includes commands to step one pixel downward on the canvas, paint a filled rectangle on the canvas, or go into a "looping" state where it may paint many filled rectangles. After the completion of each instruction, the automaton goes on to read the next instruction and execute it.

The key idea here is a set of agents that are effectively painting something, where the painting is fed back into the agents to determine what they will paint next. A single automaton can completely change the behaviour of another automaton if it happens to paint over the instructions that the other was interpreting. The visually pleasing patterns that result are an example of emergent behaviour.

The size and position of the rectangles is determined both by "loop registers" internal to the automatons, and also by the x and/or y position of the mouse.


Copyright ( C ) July, 1999, Michael McGuffin