Ants
 

 

Jean-Philippe Rennard December 2000

(Note à l'attention des lecteurs francophones : cette section est essentiellement destinée aux programmeurs, lesquels comme chacun sait sont - par force - obligatoirement anglophones. J'économise donc la version française et m'en excuse.)

LogiCell 1.0 sources

Download the applet, sources and Javadoc files

To construct a "problem", LogiCell uses the following hierarchy :

  1. CPattern objects (eater, gun ...)
  2. CLogiComp objects are basic logical components. A group of patterns constituting AND, OR ...
  3. CLogiTemplate objects are a set of CLogiComp which form an equation.
  4. Template objects are grouped in a list belonging to the Universe to construct a "problem".

Note to CA programmers. The CCell objects contain a 64 bits long integer which represent a block of 8x8 cells, and pointers to neighbours CCells. The CCells are managed with a Vector. I think the optimization is correct, but since my objective was not to design the fastest CA algorithm, it could be greatly improved.

UML like Class Diagram of LogiCell

 

 

Class Description
Logicell This class is only the browser interface for the main Frame.
CLogicellUI User Interface definition.
CLogicellAbout About Box.
CDialInfo Info dialog box.
CText Language management.
CLogicellUniverse This class is the Universe of LogiCell, the place where everything happens.
CLogicellView Cellular automata display management.
COpDispView Output display.
CCells CCells : this class manages and draws blocks of 8x8 cells (64 bits).
CLogiTemplate Generates the global structure according to Logical String entry.
CLogiComp Manages logical components : A template is a components organization.
CPattern This class manages patterns like glider gun, eater...

 

    I distribute this code to help any person interested in Alife programming and Java. It should by no way be considered as a reference.

Comments are strongly recommended ! Thanks.





Copyright ©rennard.org. 2000, 2001, 2002.

Last Update : 23 March, 2003