Skip to main content

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.

Download

pip install complexity-science


Cellular Automata

Basic usage:

import complexity_science.ca as cs

1-D CA

ca = cs.wolfram(N, 20) #creates a 1-Dimensional CA of N cells with wolfram rule number 20

ca.initialize([50]) #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

2-D CA

model = cs.brians_brain([128,128], toroidal=False)

Initializes a CA based on brians brain with toroidal boundary conditions

Available models

cs.game([dim], toroidal=True)

cs.applause([dim], alpha=1)

cs.mpa([dim], percent_mpa=0)

The dim parameter is the only required parameter for all models, others are optional. Parameters are set to default value if not specified.

alpha and percent_mpa are examples of model specific parameters.

See model documentation for more information.

Modifying Parameters

Models can be initialized randomly, binary, by index, using different functions e.g.

model.initialize_random()

model.initialize_random_bin(0.5)

model.initialize_random_int(0,2)

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.

Animation

model.animate(iteration=100)

If 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

An example 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())

Network Fragmentation

COMING SOON!

Contributing:

git clone https://github.com/KristerJazz/complexity-science.git

Metadata

Release files for complexity-science 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for complexity-science 0.0.6
File Size Uploaded Provenance Actions
complexity-science-0.0.6.tar.gz 14.0 kB Without provenance Details for complexity-science-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for complexity-science 0.0.6
File Interpreter ABI Platform Actions
complexity_science-0.0.6-py3-none-any.whl Python 3 none any Details for complexity_science-0.0.6-py3-none-any.whl

Total release size: 39.7 kB

Release files / complexity-science-0.0.6.tar.gz

Download URL complexity-science-0.0.6.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0795fa64f01c1b1e7d1634a827ca77c49a24f9d4a58cbfb42b32b09b85c81f42
BLAKE2b-256 checksum
How to use checksums
9281713596dfd9fa1a1d03477f6a08d3743c5ee07b778ab522b818a08d4a8b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / complexity_science-0.0.6-py3-none-any.whl

Download URL complexity_science-0.0.6-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ffc9279d8c6feab02f5041c754a27dda065763abe44b8be457355d6442b5a66
BLAKE2b-256 checksum
How to use checksums
b8b621eea43fa14ba0ff1c54a04da6286cc3d4e191410c2fca8c333303cf9a35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Security for complexity-science 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page