/java-ai-langton3d-opengl

Langton's Ant 3d implementation in Java and OpenGL (lwjgl stack).

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

java-ai-langton3d-opengl

Build Status

Build Status

##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

image

##Compile You need JDK 1.6 and Maven to compile the project.

    mvn clean
    mvn package

Running

After successful packaging there is one interesting artifact, a file named langton3d-1.0-release.zip.

  1. unpack file langton3d-1.0-release.zip
  2. on windows execute script named run.bat
  3. on u*ix in terminal - execute chmod +x run.sh which tells your system to mark file as executable, then execute ./run.sh. ENJOY.

Moving camera

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

Settings (at compile time)

Ant 'genetic code'

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.

World size

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

Speed of generation

org.mkdev.ai.langton3d.core.Settings#ITERATIONS

Credits

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.

History

2014-05-11

  • Initial version.

Problems?

Submit an issue.