Coder Social home page Coder Social logo

eca-explorer's Introduction

Elementary-Cellular-Automata Explorer

A command-line program for experimenting with elementary cellular automata. It takes as argument the Wolfram code (0-255) of the rule, and optionally an initial cell configuration (a sequence of ones and zeroes). By default, it runs until the entire terminal is filled with cells (in an alternate terminal screen), but you can also manually specify the number of generations to compute, and then add a delay between the generations to make it scroll.

A practical use case for this program has eluded researchers for years.

Usage

Build the binary using cargo build and invoke it according to the manual below. Optionally, you can also run it with cargo run -- [OPTIONS] <RULE> [INITIAL].

Usage: eca_explorer [OPTIONS] <RULE> [INITIAL]

Arguments:
  <RULE>
          The Wolfram code (0-255) of the rule

  [INITIAL]
          Initial cell configuration. If not specified, a random configuration with the same
          printed width as the terminal is used

Options:
  -e, --edges <EDGES>
          How the two edges are handled

          [default: wrap]

          Possible values:
          - copy: The previous edge values are retained
          - crop: Edge neighbours are set to `0`
          - wrap: Edge neighbours wrap around to the other side

  -g, --generations <GENERATIONS>
          Number of generations to run for. If not specified, the terminal height is used

  -d, --delay <DELAY>
          Number of milliseconds to delay before the next generation is computed

  -h, --help
          Print help (see a summary with '-h')

Examples

Rule 22 with a single toggled cell

$ eca_explorer 22 0000000000000000000000000001000000000000000000000000000

rule 22 demo

Rule 62 with a single toggled cell

$ eca_explorer 62 0000000000000000000000000001000000000000000000000000000

rule 62 demo

Rule 45 with randomized cells

$ eca_explorer 45

rule 45 demo

Rule 90 with randomized cells

$ eca_explorer 90

rule 90 demo

eca-explorer's People

Contributors

user-simon avatar

Watchers

 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.