Some models, mostly cellular automata, written in C++ with SDL2. If you have any trouble compiling or running the models, please start an issue!
You need the SDL2 headers and static libraries. You can probably get them from http://libsdl.org/download-2.0.php.
Each of the models is intended to compile into an independant executable.
Download the SDL2 runtime binaries, or build them from source: http://libsdl.org/download-2.0.php.
- diffusion - A model of diffusion, i.e. the movement of energy from high concentration areas to low concentration areas. Currently unimplemented.
- forestfire - A model as described in Bak, Chen, and Tang's 1990 paper 'A forest-fire model and some thoughts on turbulence'.
- percolation - A model of percolation.
- schelling - A model as described in Schelling's 1969 paper 'Models of Segregation', rendered in two dimensions.
- sugarscape - A model as described in Epstein and Axtell's 1996 book 'Growing Artificial Societies'.
- traffic - The Biham-Middleton-Levine traffic model.
- Use the
leftandrightarrow keys to step backwards and forwards through the model (currently, stepping backwards is not implemented.) - Use the
spacekey to toggle autoplay of the model. - Press
rto reinitialize the model to a completely new state.
Many of the above models are presented in Allen Downey's book Think Complexity, 2nd edition. After reading his excellent book, I contrived to implement the models myself, as a learning exercise. If you'd like an in-depth analysis of these models, and complexity science in general, I encourage you to read Mr. Downey's book.