A package for complexity science research
Complexity Science Package
This package is created mainly for convenience in doing complex systems research.
The design implementation and structure of the package is motivated for scalability and ease of use. Optimization maybe limited by the design, or the language itself.
pip install complexity-science
import complexity_science.ca as cs
ca = cs.wolfram(N, 20) #creates a 1-Dimensional CA of N cells with wolfram rule number 20
ca.initialize() #initializes the 50th cell of the CA
ca.run(100) #returns the resulting state of the CA for 100 iterations following the rule and plots the result with a default colormap
model = cs.brians_brain([128,128], toroidal=False)
Initializes a CA based on brians brain with toroidal boundary conditions
dim parameter is the only required parameter for all models, others are optional. Parameters are set to default value if not specified.
percent_mpa are examples of model specific parameters.
See model documentation for more information.
Models can be initialized randomly, binary, by index, using different functions e.g.
Models with specific parameters can be modified by this function.
model.modify_rule(parameter = new_value)
See model documentation for more information on available parameters
Adding rules and models
Please contact the author for more information.
iteration is not set, animation will continue infinitely.
Animation in jupyter notebook
import complexity_science.ca as cs import matplotlib.pyplot as plt from matplotlib import animation, rc from IPython.display import HTML
Game Of Life animation will be as follows
game = cs.game([50,50]) game.initialize_random_bin(0.5) anim = game.jyp_anim() HTML(anim.to_html5_video())
git clone https://github.com/KristerJazz/complexity-science.git
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size complexity_science-0.0.6-py3-none-any.whl (25.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size complexity-science-0.0.6.tar.gz (14.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for complexity_science-0.0.6-py3-none-any.whl