An open API service indexing awesome lists of open source software.

https://github.com/omardelarosa/automata-sim

Simple Cellular Automata runner, evaluator and plotter
https://github.com/omardelarosa/automata-sim

Last synced: 2 months ago
JSON representation

Simple Cellular Automata runner, evaluator and plotter

Awesome Lists containing this project

README

          

# Celluar Automata Simulator

![](images/plot-example.png)

Run, evaluate and plot cellular automata simulations from a simple command line interface.

## Installation

Using pipenv, install and then load the shell

```
pipenv install
```

## Usage

```
usage: cli.py [-h] [--thresholds T T T T] [--universe-size U U]
[--neighborhood-size N N] [--steps S] [--should-animate A]

Run a cellular automata simulation.

optional arguments:
-h, --help show this help message and exit
--thresholds T T T T Thresholds for kernel function. (default: (1.9, 2.1,
2.9, 3.1))
--universe-size U U Universe size (x,y) (default: (100, 100))
--neighborhood-size N N
Kernel neighborhood size (x,y) (default: (3, 3))
--steps S Number of steps to run simulation (default: 100)
--should-animate A Enable matplot lib animation. (default: False)
```

## Example

Run Conway's Game of Life for 200 steps:

```
python cli.py --steps=200
```

## Persisting Results

### Saving

```
python cli.py --neighborhood-size 3 3 --save-to=examples/gol01/gol_ca
```

### Loading

```
python cli.py --neighborhood-size 3 3 --load-from=examples/gol01/gol_ca*.npy
```