zasim is a python package for simulating and developing cellular automatons.
Its current features are:
- Reduction of boilerplate code and modularisation of cellular automaton step functions using the cagen module for Python and C++ code. This allows running a synchronous automaton asynchronously without any change to the particular computation code.
- A GUI that’s compatible with interactive usage through IPythons console, qtconsole and notebook web application.
- Display configurations in one or two dimensions.
- Show different types of histograms.
- Manipulate cellular space through external programs, such as The Gimp, text editors like Vim and Emacs or using the full range of numpy from an interactive console.
- An interactive tutorial for use with the IPython notebook.
- A couple of examples with a walkthrough guiding the user through each.
Features that are currently in development in different branches are:
- Define cells as composed of multiple subcells (numpy-records branch)
- Turn any synchronous cellular automaton into an asynchronous automaton that still does the same computation.
The zasim code can be found on github. Additionally, this documentation is built with “view source” links for the files.
There is an overview document, that will explain the most common concepts of zasim.
This documentation contains a tutorial that guides you through usage of and development with zasim.
If you install the ipython notebook and its dependencies, you can run either of the following commands
zasim_tutorial
python -m zasim.examples.notebooks.notebook_app
ipython notebook --notebook-dir=zasim/examples/notebooks/notebooks/
to start zasim’s interactive tutorial in a web browser.
Until using zasim in an interactive interpreter gets more convenient, you can use the gui or cagen packages from the commandline. Both offer a commandline argument interface with many different options. You can get a usage summary with the following commands:
zasim_cli --help
zasim_gui --help
You can find info on how to start the gui from the commandline and how to start the commandline version with complete usage summaries. There is also a section in the tutorial about how to run the commandline version.
zasim honors a few different environment variables during runtime:
See also
Debugging cagen stepfuncs goes deeper into how to use these environment variables to debug step functions.