PyCX Project



PyCX 0.32 is now available! (released on 9/9/2016)

WPyCX 0.31 rev. 2 -- a Python 3.5 port of PyCX -- is now available! (updated on 3/26/2016)

The PyCX Project aims to develop an online repository of simple, crude, yet easy-to-understand Python sample codes for dynamic complex systems simulations, including iterative maps, cellular automata, dynamical networks and agent-based models.

Download PyCX files
Project Summary on

Current Version: (updated on 9/9/2016) and (updated on 3/26/2016)
Codes are tested with Anaconda Python 2.7 and 3.5.

Note to Jupyter users (posted on 8/16/2017)
To run PyCX's dynamic simulations from Jupyter, take the following steps:

1. In Jupyter's "Files" tab, go to the folder where your simulation code and exist.
2. Open a new Jupyter notebook.
3. Execute "%run abc" in the notebook (where "abc" should be replaced by the name of your code).
4. For repeated execution of simulations, use the "Kernel" -> "Restart & Run All" option from the top menu.

Note to Anaconda/Spyder users (updated on 3/26/2016)
To run PyCX's dynamic simulations on Anaconda/Spyder, you may need to use a plain Python console (i.e., not in an IPython console).

What's new in version 0.32?
* The "" GUI module was updated with several bug fixes by Toshi Tanizawa and Alex Hill to make its GUI and visualization more stable.
* The file name of the Schelling's segregation model was changed to "abm-" to better reflect the nature of the model.
* Sample codes used in Hiroki Sayama's Open SUNY textbook ( are now included in the "textbook-sample-codes" subfolder.

What's new in version 0.31?
* The graphics backend has been changed from Tix to ttk so that Mac users can run it without installing Tix.

What's new in version 0.3?
* Przemyslaw Szufel & Bogumil Kaminski at the Warsaw School of Economics made a substantial improvement to the ""
GUI module, implementing interactive control of model and visualization parameters.
* Several new sample simulation codes were added.
* PyCX is now distributed under the FreeBSD license (see LICENSE.txt).
For more details, read the "README.txt" (can be found at the bottom of this page)

What You Should Do

1. Install Python, NumPy, SciPy, matplotlib and NetworkX.

2. Download a PyCX sample code of your interest from here.

3. Run it.

4. Read it.

5. Change it as you like.


PyCX Tutorial at ECAL 2013 (Slides)

Paper on PyCX published in Complex Adaptive Systems Modeling (open access)

Open SUNY Textbook: Introduction to the Modeling and Analysis of Complex Systems (open access)


Copyright 2011-2016 by Hiroki Sayama <>