Moved Life implementations into 'life' directory.
[cellular-automata.git] / life / 001 / README.md
CommitLineData
4aa28332
SK
1life-001
2========
3
4
5Approach
6--------
7The grid is represented as flat list of sequential ID's, where neighbors are
8calculated using the offset relative to the desired length of the printed
9X-axis. See my prototyping doodles at the bottom.
10
11Each cell is represented as a gen_server process named after its corresponding
12ID on the grid and holding the names of its neighbors in its state record.
13
14Likewise, time is represented as a gen_server process which sends ticks to all
15cells and collects state responses, then proceeds to sort and print the
16resulting board - this constitutes one generation.
17
18Upon receipt of a tick, a cell broadcasts its state to its neighbors, then
19proceeds to collect counterpart broadcasts from its neighbors. Upon collection
20of all broadcasts - it calculates its new state and sends it to the time
21process.
22
23Additionally, there's, a non-essential, observer process, whose job is to
24simply log the statistics for each run of the simulation.
25
26
27Usage
28-----
bdfda001
SK
29* Get: `git clone git://github.com/ibnfirnas/life.git`
30* Enter: `cd life/001`
31* Build: `make`
32* Run: `./bin/life`
4aa28332
SK
33
34
35Doodles
36-------
dc579829 37![Doodles](https://github.com/ibnfirnas/life/raw/master/001/doodles.jpg)
This page took 0.019447 seconds and 4 git commands to generate.