LifeHex version 1.0   
	copy right Yukio Hirose  (peechan@po.aianet.ne.jp)

Intro
 LifeHex is a cellular automata system simulation software such like the John Conway's so called Life game that attempts to be entertaining. It enables the user to examine variable of about 64000000 rules for processing generations, with fancy graphics rendering and fast enough computation of generations. Currently, its generation speed (graphcs rendering is not counted) is 300 or more generations per one second for 250000 (512x512) cells with my PPC G3 300 processor.

Quick start
 Start LifeHex by double-clicking its icon. 
(a) Just click on the rule panel located on the top of screen and see what happen in the window.
(b) Open a file bundled with this software named "LifeHexRules" from File menu in the "Control" window. Click on any items in the list of rules and see what happen in the window.

Contact (My request for you)
 Latest version of LifeHex will be published at the following URL: 
		http://www.aianet.ne.jp/~peechan/LifeHex/index.html
I hope you enjoy with this software and send me your new creation of rules, so that it is shared by every one. It will be placed at the address above with your credit. Rules are stored as fairly simple format of text (see below for details) and easy to send via e-mail (peechan@po.aianet.ne.jp). Also, any comments or suggestions are welcome.

What are Cellular Automata (CA)?
	A quote from  [http://alife.santafe.edu/alife/topics/ca/]
================================================
 A cellular automaton is a discrete dynamical system. Space, time, and the states of the system are discrete. Each point in a regular spatial lattice, called a cell, can have any one of a finite number of states. The states of the cells in the lattice are updated according to a local rule. That is, the state of a cell at a given time depends only on its own state one time step previously, and the states of its nearby neighbors at the previous time step. All cells on the lattice are updated synchronously. Thus the state of the entire lattice advances in discrete time steps.
================================================

Processing of generations
 Each cell takes only 2 states say, LIVE or DEAD. As you can guess from the term "Hex" in LifeHex, cells are structured as hexagonal lattice in 2-dimensional space (i.e. 6 neighbors for each cell). A cell's state is determined by its local state of previous generation, where local state involves state of the cell itself and its neighbor state, namely states of the 6 neighbors. If 2 local states matchs by rotation or reflection, they are treated as congruent state and produce same result in next generation. Under the congruency, there are 13 neigbour states are possible and so 26 local states.

Rule Controler
 There are 26 buttons for controling rule (and 2 additinal buttons named "Alternate" and "Randomize" for convenience). Each columns corresponds to a group of cogruent states of neighbours (see above for the term "congruent").For example, the 3rd left most column represents a neighbor state such that 2 contiguous neighbor cells are in LIVE state no matter which dirrection they live. The diffrence between the buttons in upper and lower row is: 
 (1) The upper row determines the "live" rule:
when a paticular state of neigbors is active, a cell of that state with LIVE state continues to live in the next generation.
 (2) The lower row determines the "born" rule: 
when a paticular state of neigbors is active, a cell of that state with DEAD state will become LIVE state in the next generation.
 Each buttons (local states) has its own code name (from left to right order):
        Upper:  a0, a1, a2, b2, c2, a3, b3, c3, a4, b4, c4, a5, a6 
        Lower: A0, A1, A2, B2, C2, A3, B3, C3, A4, B4, C4, A5, A6
 where the naming convention consits of: 
        0~6: Represents number of neighbours. 
        A/a: Neighbours are arranged contiguously. 
        B/b: Not A/a, C/c
        C/c: Not A and has "symmetric" arrangement.

 The Alternate button: 
Alters the rule as if the role of LIVE and DEAD states are swaped. Try it and examine the effect.
 The Randomize button: 
Initialize all cells in the space so that each of cells takes randomely chosen state. 

Rendering Controler
Dot Size:
 Specifies how large each cell is drawn. 4 possibilities: 1x1, 2x2, 4x4, 8x7 (width x height in pixel size).
Period:
 Determines the number of generations per one rendering frame. Setting this parameter may dramatically change visual effect under some situation.
Method:
 Determines how the state of each cells affect to rendering.
 (1) Monochrome:
 The simplest method that the state of a cell directly affects to the color for rendering. Since each cell has only 2 state, the resulting image is monochrome.
 (2) Gradation: 
 Same as Monochrome, but the color for LIVE state cell is determined by its "age" up to certain limit (if the age exceeds the limit, the color for max age is used).
 (3) Rotation: 
 Same as Gradation, but without the limit of age. If the age exceeds the limit, the color for that cell is reseted to the color for DEAD state.
 (4) Generation: 
The color for a cell is determined by history of the cell for certain constant length of generations (4 generations current).

"Avoid screen flashing" Checkbox
 There is a possibility that almost all cells synchronously repeats DEAD and LIVE states under some rule. (Example: turn off all buttons except A0) In such case, the screen repeates flashing with color for LIVE and DEAD state, which is very discomfortable. If this check is on, most of such cases are avoided to happen. (How it works: forces the period parameter to even number when the button a6 is off and A0 is on. ) If you carry epilepsy, be carefull to turn off this check box. The default value is on.

Color controler
 Manages the rendering color. Current version of LifeHex uses 4-bit index color model for rendering. The left most box represents the color for DEAD state. Colors are treated slightly different way for each of rendering method.
(1) Monochrome: 
Uses only the leftmost (for DEAD) and rightmost(for LIVE) color.
(2) Gradation: 
The n-th color from left represents LIVE cells of age n-1. If n>=15, the right most color is used.
(3) Rotation: 
LIVE cell cycles to represent colors from left to right (i.e. a color indicates age modulo 16)
(4) Generation: 
If a history of cell state is LIVE->LIVE->LIVE->DEAD then n-th color from left is used for the cell, where binary representation of n-1 is 1110.

The Rule List Window
 You can save your new creation by creating a new file from File menu or adding a rule to an existing one. 

File Format
 LifeHex stores list of rules as a text file formated as following example:

%LifeHex vers.1.0
Amoeba	a3456 A2B2C2
Kite	a235b4 A245B3C2
Mirage	a235b4 A245B3C234
Mirage2	a235b4 A2
Bars	a345b4c24 A246B34C4
....
	
 The first line represents header string and version number. For the rest, each line represents one rule consists of name followed by rule description string with tab character as a delimiter.
For the second line of above example, the name is "Amoeba" and the rule is defined as local states of code names a3,a4,a5,a6,A2,B2,C2 are active. Any lines without a tab character are ignored. Maximal name length is 63 bytes and maximal file size is 64k bytes. (If the file size exceeds 64k the rest are ignored.)
	 

Special thanks:
	 Tetsuo Yamada who have compiled LifeHex for Intel platform.

