Skip to content

Latest commit

 

History

History
129 lines (95 loc) · 4.45 KB

samples.md

File metadata and controls

129 lines (95 loc) · 4.45 KB

DrAutomaton sample projects

Sample projects that use DrAutomaton may be found in samples/.


Brian's brain free-for-all

Developed by Brian Silverman, Brian's Brain is a variation on Conway's Game of Life. Cells are on (or alive), dying or off (or dead), mirroring the possible states of a neuron. Cells hat die go into an intermittent dying state, then turn dead.

Brian's Brain automata tend to explode from a small amounts of cells into huge chaotic clusters of swirling spaceships. In this example, we create a small random rect of on and dying cells in the center of a torus. Soon, the torus will crawl with on/dying cells.

For details, see Wikipedia: Brian's Brain.


Cyclic automaton

A cyclic automaton's states each have a unqiue successor state. Usually the states are called 0, ... , N-1, where 1 succeeds 0, etc. and 0 succeeds N-1. The rules are simple: If a cell contains a successor in it's neighborhood, the cell assumes the succeeding state.

In the sample, the space is initialized with random cells. Soon, the cells will organize into blocks of color, finally giving rise to demons, from which spiral of color emenate. You can see a very young demon in the lower middle part of the image.

On the technical side, this is an example of a rule that uses a state type that's not an enum. This particular automaton lives on a torus, but practically any other geometry seems feasible.

For details, see Wikipedia: Cyclic cellular automaton.


Gosper's glider gun

Gosper's glider gun is the first glider gun in J.H. Conway's Game of Life, discovered by B. Gosper in 1970, a periodic cellular automaton that emits spaceships. In particular, this pattern yields an ever increasing total number of live cells, disproving a previous conjecture by Conway.

Gosper's glider gun is one of many examples (alongside Langton's loops below) that display infinite reproduction capability, linking the notion of cellular automaton to research about artificial life and von Neumann's ideas about the colonization of Mars (see Inventing Game of Life (John Conway) - Numberphile).

We create the illusion that this automaton lives on an infinite plane by only viewing a small vista of a slightly larger rectangular space with a border for the gliders to crash into right outside the CA's viewport.

For details, see Wikipedia: Gun.


Langton's self-replicating loops

Published by C.G. Langton in [1]. Langton's self-replicating loops (SR loops) are capable of reproducing or cloning themselves up to four times before dying, and exhibit a structure that somewhat resembles that of a biological cell. Recent modifications of Langton's transition table introduce concepts like natural selection, disease and sexual activity.

Langton's loops rotationally symmetric transition table is implemented using an std::unordered_map with four items per transition (one for each rotation), which is surprisingly fast. We create the illusion that this automaton lives on an infinite plane by only viewing a small vista of a slightly larger rectangular space with a border for the loops to crash into right outside the CA's viewport.

For details, see Wikipedia: Langton's loops.


[1] C.G. Langton, Self-reproduction in cellular automata, Physica D. 10 (1984), no. 1--2, 135--144.