# The goal of the Life Game program

is the simulation of biological competitions of animals.

## Features

### Territory

The competition happens on a territory. The territory may be finite bounded, finite closed, infinite.
• Finite closed surfaces like cylinder, torus can be covered by regular polygons but the decision about neighborhood would be complicated. (The leftmost cell have rightmost neighbors, so on.)
• The infinite playground may result infinite number of generations and it causes difficulties in the display and the storage of the results.
• The territory is divided into congruent discrete cells positioned on a grid.

### Cells

• The cells may be regular polygons like triangles, squares and hexagons in order to the tight cover of the playground.
• Triangles have been excluded from the implementation.
• The product of the count of grid and the cell sizes are limited by the screen resolution and the size of the picture.

Allowed territory and cell sizes
rectangles over a rectangular territory, rectangles over a rectangular territory with ignored neighbors at the corners
regular hexagons within a square territory, regular hexagons within a regular hexagonal territory

### Coordinates

The cells have two integer coordinates.
• rectangular,
• hexagonal.
The central cell is r(0,0), and h(0,0), respectively. These coordinates must fulfill a system of inequalities in case of finite territory.

#### Neighbors

The cells have neighbors whose count and state determines the fate of the cell in the subsequent generations. (In case of finite or infinite closed grid like a cylinder or a torus the leftmost cells are the neighbors of the rightmost cells.)
Classification of the neighbors
Shape of cells
Rectangular Hexagonal
Group Group
At side At corner At side
Airt Airt Clock
North Northeast XII
East Southeast II
South Southwest IV
West Northwest VI
VIII
X
Total count of the neighbors
446
8
• The simplest model allows two states of the cells:
• empty and
• inhabited. The current implementation allows more ones:
• empty
• inhabited with a given organism
• intoxicated for a given number of generations
• deserted that is not longer suitable for a living organism.
• The cells may have an aliment level property. This is a vectorial quantity (different kin of food, drinking water).

### Life cycle of the animals

• Animals are living in the inhabited cells.
• The animals have cell coordinates.

### Rules

• The organisms have common birth and death rules expressed as lists of count of neighbors causing birth and deaths, respectively:
If the cell is empty and it has two or three living neighbors of the same species then a newborn organism of that species will be there in the next generation.
If the cell is inhabited and it has four or more living neighbors then the organism dies.
• and separate ones valid only for a given species.
• The simple rule set uses only the count of living neighbors of them.
• The program contains a check box whether the cells touching only at their corners are considered as neighbors or excluded during the counting of the neighbors.
(This question does not matter in case of hexagonal grids, because all neighbors touch each other at common edges.)
• The sophisticated rules which are not implemented in this program include the cell aliment level properties and the age of the individual animal.
• The lower level neighbor seeking preciates of the program give back the directions of the neighbors from the central cells. This makes possible later addition of anisotropic birth and death rules. The current user interface does not allow that kind of distinction.
• This program permits the user to specify lifetimes (number of generations) for each species.
• The life of the species may be split into stages like that of the insects with given number of generations before the transition of the next state.
If an organism has more than one stage of development a transition time must be specified for all except the final one.
• Normally the reproduction of the species is agamous. Their sex is missing from the rules.

### Sex

If sex is relevant data then
• an empty cell can be filled by a newborn organism, only if it has two neighbors from the same species but different sex.
• The sex of the newborn individuals of the organism is in the above case is deterministic:
• alternately male and female.

### State changes

The cell where an organism has died
• may be filled by a newborn organism already the next generation
• may be filled only after given count of generations characteristic of the species of the dead organism,
• deserted eternally that is excluded from the birth places.

### Competition and interaction of the species

The current implementation allows
• peaceful concurrence of competing species,
• preset predator-prey definitions.
This predator prey rules are made of four symbols:
• species of the predator,
• life stage of the predator;
• species of the prey,
• life stage of the prey.
If such rules have been entered, if a cell is inhabited by a prey, and at least one of its neighbors is a predator then the cell of the prey becomes empty in the next generation.

## The initial state of the cells

1) Manual selection: The user clicks on the desired cells, selects their state, and inhabitants, and confirm the selection one by one.
2) Random fill: The user fills in a real field asking the probability of the inhabited state, selects the species, and confirms his/her selection.
3) Periodic pattern:
• The user selects a species.
• The user fills in the coordinates of the center,
• gives the coordinates of two translation vectors,
• from and to indexes of the repetition of the translation,
• from, to and step indexes of the neighbor zones around the translated point.
• He/she finally confirm the above parameters.
• These parameters may be saved for future usage.