Langton's Ant 1.0

Langton's Ant project is an example of a finite-state cellular automata.
Langton's Ant project is an example of a finite-state cellular automata.

The ant (or ants) start out on a grid. Each cell is either black or white. If the ant is on a black square, it turns right 90 and moves forward one unit.

If the ant is on a white square, it turns left 90 and moves forward one unit. And when the ant leaves a square, it inverts the color.

The neat thing about Langton's Ant is that no matter what pattern field you start it out on, it eventually builds a "road," which is a series of 117 steps that repeat indefinitely, each time leaving the ant displaced one pixel vertically and horizontally.

It should compile with g++ -lm -lpng -lz `gtk-config --libs` langton.c

Requirements:

· libstdc++

last updated on:
December 5th, 2006, 19:05 GMT
price:
FREE!
developed by:
Matt Chisholm
homepage:
theory.org
license type:
GPL (GNU General Public License) 
category:
ROOT \ Games \ Simulation

FREE!

In a hurry? Add it to your Download Basket!

user rating 15

2.7/5
 

0/5

Rate it!

Add your review!

SUBMIT