All Projects → williamgilpin → convoca

williamgilpin / convoca

Licence: other
Predict and analyze cellular automata using convolutional neural networks

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to convoca

PyGameofLife
Conway's Game of Life using python's matplotlib and numpy
Stars: ✭ 40 (-39.39%)
Mutual labels:  game-of-life, cellular-automata
cellular-automata-explorer
(WIP) An interactive web app for exploring cellular automata.
Stars: ✭ 18 (-72.73%)
Mutual labels:  game-of-life, cellular-automata
logic-life-search
Cellular automata search program
Stars: ✭ 23 (-65.15%)
Mutual labels:  game-of-life, cellular-automata
rlifesrc
A Game of Life pattern searcher written in Rust. 用 Rust 搜索生命游戏中的图样。
Stars: ✭ 15 (-77.27%)
Mutual labels:  game-of-life, cellular-automata
ALPACA
A Language for the Pithy Articulation of Cellular Automata
Stars: ✭ 21 (-68.18%)
Mutual labels:  cellular-automata
rescript-game-of-life
Game of Life in ReasonML with ReasonReact in 2020
Stars: ✭ 36 (-45.45%)
Mutual labels:  game-of-life
elixir-game of life
Game of Life in Elixir. Distributed Game of Life with Board Server API. Run it on multiple nodes.
Stars: ✭ 53 (-19.7%)
Mutual labels:  game-of-life
GameOfLife
Conway's Game of Life
Stars: ✭ 18 (-72.73%)
Mutual labels:  game-of-life
webgpu-cca
Experiment implementation of Multiple Neighborhoods Cellular Automata using WebGPU
Stars: ✭ 31 (-53.03%)
Mutual labels:  cellular-automata
coolrs
CoolRs is a collection of Android Renderscript effects.
Stars: ✭ 41 (-37.88%)
Mutual labels:  game-of-life
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 (-50%)
Mutual labels:  cellular-automata
ton-lang
A visual programming language, evaluated as a cellular automaton
Stars: ✭ 60 (-9.09%)
Mutual labels:  cellular-automata
c games
[Some C games] Some simple games written in C language.
Stars: ✭ 31 (-53.03%)
Mutual labels:  game-of-life
vim-gol
Vim plugin that turns your text into Game of Life world
Stars: ✭ 15 (-77.27%)
Mutual labels:  game-of-life
cellular
A simple command-line tool that generates gif images and animations from elementary cellular automata
Stars: ✭ 28 (-57.58%)
Mutual labels:  cellular-automata
js-simulator
General-purpose discrete-event multiagent simulation library for agent-based modelling and simulation
Stars: ✭ 52 (-21.21%)
Mutual labels:  game-of-life
svelte-game-of-life
Conway's Game of Life in Svelte
Stars: ✭ 14 (-78.79%)
Mutual labels:  game-of-life
MicroPython-ESP8266-Nokia-5110-Conways-Game-of-Life
Conway's Game of Life on a Nokia 5110 with WeMos D1 mini running MicroPython ESP8266
Stars: ✭ 27 (-59.09%)
Mutual labels:  game-of-life
game-of-life
Conway's Game Of Life with a small evolutionary twist.
Stars: ✭ 41 (-37.88%)
Mutual labels:  game-of-life
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 (-60.61%)
Mutual labels:  cellular-automata

convoca

Demonstrate and learn cellular automata using convolutional neural networks in TensorFlow

Game of Life training stages

The video above shows different stages of training a network to learn Conway's Game of Life. This code both implements and analyzes known CA rulesets using TensorFlow, and it also learns the rules of unknown CA given an image sequence as training data. If you find this code useful, please consider citing the accompanying publication:

Gilpin, William. "Cellular automata as convolutional neural networks." Physical Review E 100.3 (2019): 032402. arXiv

Demos and features

The demos.ipynb illustrates a minimal example of training a CNN on the Game of Life, including example outputs. Models are instantiated using the initialize_model(...) function, which builds a network with a trainable convolutional filter as the first layer, which serves to extract information about the neighborhood of each cell. Repeated 1x1 convolutions in subsequent layers implement the CA rules, and a final softmax layer assigns an output state to each cell. For cases in which the CA ruleset is radially symmetric, the optional SymmetricConvolution layer imposes radially-symmetric structure on the learned convolutional kernels, which is often the case for natural systems with "totalistic" rules. An optional Wraparound2D layer also allows periodic boundary conditions to be implemented in the convolutions.

Installation and Requirements

Install directly from GitHub using

pip install git+git://github.com/williamgilpin/convoca

Typical installation with Miniconda. This code has been tested on macOS and Ubuntu.

  • Python >3.4
  • TensorFlow >2.0
  • numpy
  • matplotlib
  • Jupyter notebooks (for demos)

Structure

The package contains the following libraries

train_ca : requires TensorFlow

ca_funcs : requires TensorFlow

utils : minor functions that support the main methods. Requires numpy only.

demos.ipynb : demonstration of the code for learning the game of live

Updates

As of 2.26.2020, the code has been significantly re-factored to use Tensorflow 2.0 and Keras. The previous implementation has been placed in the "resources" directory, for reference.

Planned future work

  • Add methods for simulating totalistic CA
  • Add methods for Moore neighborhood CA
  • Add demos recreating classic experiments, such as the results in Langton. Physica D, 1990.
  • Add statistical physics calculations such as an efficient calculation of "activity" for a CA
  • CA on graphs using an adjacency matrix --> grid convolutional operator
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].