Giter Site home page Giter Site logo

cellularautomata's Introduction

Cellular Automata + Game Of Life

Command-line tool to create .png snapshots of cellular automata and Conway's game of life simulations. Snapshots are automatically saved to snaps directory.

Installation

Install Elixir

Install dependencies:

mix deps.get

Start it up:

iex -S mix

Usage

Create a single cellular automata for given ruleset with given number of rows:

CellularAutomata.main(rule_int, num_rows)

Rule 30 -- 1000 rows

CellularAutomata.main(30, 1000)

Rule 150 -- 1000 rows

CellularAutomata.main(150, 1000)

Feed cellular automata for given ruleset with given number of rows through game of life for given number of rounds:

CellularAutomata.main(rule_int, num_rows, rounds)

A .png snapshot will be taken for each round (gifs sold separately).

Rule 30 -- 100 rows -- 250 rounds

CellularAutomata.main(30, 100, 250)

Rule 54 -- 100 rows -- 250 rounds

CellularAutomata.main(54, 100, 250)

Rule 60 -- 100 rows -- 250 rounds

CellularAutomata.main(60, 100, 250)

Rule 129 -- 100 rows -- 50 rounds

CellularAutomata.main(129, 100, 50)

Rule 205 -- 100 rows -- 50 rounds

CellularAutomata.main(205, 100, 50)

Rule 222 -- 100 rows -- 50 rounds

CellularAutomata.main(222, 100, 50)

Rule 37 -- 100 rows -- 50 rounds

CellularAutomata.main(37, 100, 50)

Rule 76 -- 100 rows -- 50 rounds

CellularAutomata.main(76, 100, 50)

Generate random board of given width and height, feed it through game of life for given number of rounds:

GameOfLife.main(width, height, rounds)

200 x 200 -- 150 rounds

GameOfLife.main(200, 200 ,150)

cellularautomata's People

Contributors

jwebber18 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.