All Projects → lantunes → netomaton

lantunes / netomaton

Licence: Apache-2.0 license
A Python library for working with Network Automata, Cellular Automata, and other discrete dynamical systems

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to netomaton

flocc
Agent-based modeling in JavaScript in the browser or on the server.
Stars: ✭ 26 (-31.58%)
Mutual labels:  cellular-automata, complex-systems
agentpy
AgentPy is an open-source framework for the development and analysis of agent-based models in Python.
Stars: ✭ 236 (+521.05%)
Mutual labels:  complex-systems
ALPACA
A Language for the Pithy Articulation of Cellular Automata
Stars: ✭ 21 (-44.74%)
Mutual labels:  cellular-automata
Mixed Cell Cellullar Automata
The Mixed-Cell Cellullar Automata (MCCA) provides a new approach to enable more dynamic mixed landuse modeling to move away from the analysis of static patterns. One of the biggest advantages of mixed-cell CA models is the capability of simulating the quantitative and continuous changes of multiple landuse components inside cells.
Stars: ✭ 33 (-13.16%)
Mutual labels:  cellular-automata
ton-lang
A visual programming language, evaluated as a cellular automaton
Stars: ✭ 60 (+57.89%)
Mutual labels:  cellular-automata
artistoo
CPM implementation in pure JavaScript
Stars: ✭ 25 (-34.21%)
Mutual labels:  cellular-automata
cellular-automata-explorer
(WIP) An interactive web app for exploring cellular automata.
Stars: ✭ 18 (-52.63%)
Mutual labels:  cellular-automata
convoca
Predict and analyze cellular automata using convolutional neural networks
Stars: ✭ 66 (+73.68%)
Mutual labels:  cellular-automata
xentica
GPU-accelerated engine for multi-dimensional cellular automata
Stars: ✭ 29 (-23.68%)
Mutual labels:  cellular-automata
ewstools
Python package for early warning signals (EWS) of bifurcations in time series data.
Stars: ✭ 29 (-23.68%)
Mutual labels:  complex-systems
cellular
A simple command-line tool that generates gif images and animations from elementary cellular automata
Stars: ✭ 28 (-26.32%)
Mutual labels:  cellular-automata
HCA saliency codes
Codes for HCA (Hierarchical Cellular Automata for Visual Saliency) accepted by IJCV 2018.
Stars: ✭ 18 (-52.63%)
Mutual labels:  cellular-automata
sandbox
2D Pixel Physics Simulator
Stars: ✭ 76 (+100%)
Mutual labels:  cellular-automata
gpuvmem
GPU Framework for Radio Astronomical Image Synthesis
Stars: ✭ 27 (-28.95%)
Mutual labels:  complex-systems
forma
A Lua toolkit for computational geometry on a grid
Stars: ✭ 34 (-10.53%)
Mutual labels:  cellular-automata
Roguelike-Procedual-Cave-Generator
A procedurally generated, cave-like dungeon/map creator for rogue-like games using the cellular automata method. During its development, I solved a common/limiting problem with this algorithm that might explain why it is not more commonly implemented in such games.
Stars: ✭ 26 (-31.58%)
Mutual labels:  cellular-automata
cas
Cellular Automata Simulator
Stars: ✭ 22 (-42.11%)
Mutual labels:  cellular-automata
terrame
TerraME is a programming environment for spatial dynamical modelling
Stars: ✭ 33 (-13.16%)
Mutual labels:  cellular-automata
PyGameofLife
Conway's Game of Life using python's matplotlib and numpy
Stars: ✭ 40 (+5.26%)
Mutual labels:  cellular-automata
nutshell
[alpha!] [on hiatus] An advanced cellular-automaton-specification language that transpiles to Golly's.
Stars: ✭ 16 (-57.89%)
Mutual labels:  cellular-automata
logo

Netomaton is a Python framework for exploring discrete dynamical systems. It is a software abstraction meant to aid in the implementation of models of collective computation. Examples of such computational models include Cellular Automata and Neural Networks. This also includes some continuous dynamical systems, such as ordinary and partial differential equations, since the simulation of such systems involves the discretization of space and time. Netomaton is also a tool for exploring Complex Systems.

Underlying all discrete dynamical systems (and discretized continuous dynamical systems) are networks of stateful units that obey rules that specify how their states change over time. Netomaton thus considers all dynamical systems as a model of computation known as Functional Network Automata.

testing status latest version

Getting Started

Netomaton can be installed via pip:

pip install netomaton

Requirements for using this library are Python 3.6, numpy 1.15.4, matplotlib 3.0.2, networkx 2.5, and msgpack 1.0.2.

What are Network Automata?

The Wikipedia entry for Network Automata has stated:

A network automaton (plural network automata) is a mathematical system consisting of a network of nodes that evolves over time according to predetermined rules. It is similar in concept to a cellular automaton, but much less studied.

Stephen Wolfram's book A New Kind of Science, which is primarily concerned with cellular automata, briefly discusses network automata, and suggests (without positive evidence) that the universe might at the very lowest level be a network automaton.

A Network Automaton is a discrete dynamical system comprised of a collection of nodes (the computational units) causally connected to each other, as specified by a network-defining adjacency matrix. The nodes adopt states at each timestep of the network's evolution, as prescribed by an activity function, f. Moreover, the network's topology can also change over time, as prescribed by a connectivity function, g.

The network's topology is specified by the adjacency matrix, A, which is of size Ntot X Ntot, where Ntot represents the total number of nodes in the network. Each non-zero entry in A represents the existence of a link. The value of the entry represents a link weight. The matrix A thus contains information about the existence of links, and their direction.

The network is evolved for T timesteps. The activity of the network is defined by the activities of all its nodes, and is represented by St, where t is a particular timestep. During each timestep, the activity function f is invoked, followed by the connectivity function g, such that:

St+1 = f(At, St)

At+1 = g(At, St)

There are no restrictions to the kinds of topological changes that a network may undergo over the course of its evolution. A network may have nodes added or removed at any given timestep.

To learn more, please refer to the scientific literature on the subject:

Wolfram, S. (2002). A New Kind of Science (pp. 475–545). Champaign, IL: Wolfram Media.

Tomassini, Marco. "Generalized automata networks." International Conference on Cellular Automata. Springer, Berlin, Heidelberg, 2006.

Sayama, Hiroki, and Craig Laramee. "Generative network automata: A generalized framework for modeling adaptive network dynamics using graph rewritings." Adaptive Networks. Springer, Berlin, Heidelberg, 2009. 311-332.

Smith, David MD, et al. "Network automata: Coupling structure and function in dynamic networks." Advances in Complex Systems 14.03 (2011): 317-339.

Examples

Here's an example of the Elementary Cellular Automaton Rule 30 (as described by Stephen Wolfram in his book A New Kind of Science), implemented with the Netomaton library:

import netomaton as ntm

network = ntm.topology.cellular_automaton(n=200)

initial_conditions = [0] * 100 + [1] + [0] * 99

trajectory = ntm.evolve(network=network, initial_conditions=initial_conditions,
                        activity_rule=ntm.rules.nks_ca_rule(30), timesteps=100)

ntm.plot_activities(trajectory)

This repository contains examples of implementations of various kinds of collective computation models, all implemented using the Netomaton framework. Follow the link to learn more:

Additionally, this library includes a number of utility functions for working with the results produced by the automata. For example, there is the animate function, which is explained more here. It is also important to understand the timesteps and input parameters of the evolve function, explained here.

About this project

This project proposes the idea that many popular and well-known collective computational models can all be thought of as Functional Network Automata. Such models include Cellular Automata, Boltzmann Machines, and various flavours of Neural Networks, such as the Hopfield Net, and the Multilayer Perceptron. This library does not attempt to be a replacement for great frameworks such as TensorFlow, which are optimized, both in software and hardware, for working with Neural Networks, for example. What this library does attempt to be is a generalization of collective computation, instantiated in software, with the goal of helping us see similarities between models, and imagine new models that borrow features from existing examples. It aims to provide a software architecture for understanding and exploring the nature of computation in potentially dynamic networks.

Netomaton arose from a personal need to reconcile various models of collective computation. In what fundamental ways does a Neural Network differ from a Cellular Automaton? What can a Boltzmann Machine do that other models can't? What do any of these models have in common? What sorts of new models can we imagine? These are the questions that this library aspires to help answer.

Netomaton tries to make accessible any model of collective computation. In so doing, it adopts certain generalizations and abstractions that, while providing a common language for discussing seemingly disparate kinds of models, incur a cost in terms of increased runtime complexity. The cost of being very general is a less than ideal runtime performance, as any given implementation is not optimized for a specific setting. For example, regarding neural networks roughly as a series of matrix multiplications allows one to take advantage of software and hardware that can do those operations quickly. The focus of Netomaton, on the other hand, is not on practicality, but on flexibility.

Development

Create a Conda environment from the provided environment YAML file:

$ conda env create -f netomaton_dev.yaml

Documentation

To build the Sphinx documentation, from the doc directory:

$ make clean html

The generated files will be in _build/html.

Testing

There are a number of unit tests for this project. To run the tests:

$ pytest tests

Citation Info

This project has been published on Zenodo, which provides a DOI, as well as an easy way to generate citations in a number of formats. For example, this project may be cited as:

Antunes, Luis M. (2019, September 28). Netomaton: A Python Library for working with Network Automata. Zenodo. http://doi.org/10.5281/zenodo.3893141

BibTeX:

@software{antunes_luis_m_2019_3893141,
  author       = {Antunes, Luis M.},
  title        = {{Netomaton: A Python Library for working with 
                   Network Automata}},
  month        = sep,
  year         = 2019,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.3893141},
  url          = {https://doi.org/10.5281/zenodo.3893141}
}

Stars

Please star this repository if you find it useful, or use it as part of your research.

Copyrights

Copyright (c) 2018-2020 Luis M. Antunes (@lantunes) All rights reserved.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].