Cellular automata simulation implemented with Python.
Description:
The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
The 'game' is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves or, for advanced players, by creating patterns with particular properties.
Requirements:
- Python 3.4
- PyGame 1.9.2a0
Use the unofficial pygame build for Python 3.4 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Installing Unofficial pygame for Python 3.4:
- Save .whl file from above to somewhere you'll remember
- Open a terminal
-
pip install wheel
- Navigate to the previous directory with .whl file
-
pip install package_name.whl
Usage:
python base.py [ -h ] [ -t ] [ -fps ]
- Press [Spacebar] at any time to create a new, blank canvas.
- Use the mouse and [Left-Click] on any open grid space to place a 'bit'.
- If clicked space is occupied, the bit will be erased.
- Press [Enter] to begin simulation for given amount of 'ticks'.
Arguments:
- -h, --help
Show this help message and exit* -t, --num_ticks
Runtime length once simulation is begun. (Default: 1000)* -fps, --framerate
Framerate (Default: 10)