##Description Langton's Ant Cellular Automata, 3d implementation in Java and OpenGL (lwjgl stack).
If You need more information about Lanton's Ant - check here: Wikipedia
##Compile You need JDK 1.6 and Maven to compile the project.
mvn clean
mvn package
After successful packaging
there is one interesting artifact, a file named langton3d-1.0-release.zip
.
- unpack file
langton3d-1.0-release.zip
on windows
execute script namedrun.bat
on u*ix
in terminal - executechmod +x run.sh
which tells your system to mark file as executable, then execute./run.sh
. ENJOY.
You can move/rotate laboratory space (cube) by using following keymap:
Key | Description |
---|---|
W | rotate down |
S | rotate up |
A | rotate right |
D | rotate left |
Q | zoom in |
E | zoom out |
Ant program
is contained in the following array: org.mkdev.ai.langton3d.core.App#CODE
.
Program contains elements, called steps, which are as follows:
Step | Description |
---|---|
RIGHT | tells ant to move right |
LEFT | tells ant to move left |
UP | tells ant to move up |
DOWN | tells ant to move down |
Note Using different program - You can make different interesting shapes and patterns that are formed by an Ant's trail.
You can change dimension (measured in 'cubes' per coordination axis), changing values for these fields:
org.mkdev.ai.langton3d.core.MapCube#W
changes width
of laboratory space
org.mkdev.ai.langton3d.core.MapCube#H
changes height
of laboratory space
org.mkdev.ai.langton3d.core.MapCube#D
changes depth
of laboratory space
org.mkdev.ai.langton3d.core.Settings#ITERATIONS
Special thanks to Andrzej Masłowski for asking the right question at the right time.
It all started while studying as an mid-term project about 2004. Today's version is refactored solution created solely for my own consumption and amusement. Then I've decided to share it with JAVA community.
2014-05-11
- Initial version.