Skip to content

The goal of this project is to implement Wolfram's elementary cellular automaton in the terminal.

License

Notifications You must be signed in to change notification settings

antwxne/Wolfram

Repository files navigation

Wolfram haskell

The goal of this project is to implement Wolfram’s elementary cellular automaton in the terminal.

We had to implement rules 30, 90 and 110.

But it was easier to implement all rules with a generic method.

gif algo

Previews

Rule 30
Rule 90
Rule 110

Requirements

Stack

To install stack please refer to the installation guide

Build and run

Linux:

make
./wolfram --rule R [ [--start S][--lines L][--window W][--move M] ]
  • --rule : the ruleset to use (no default value, mandatory)
  • --start : the generation number at which to start the display. The default value is 0.
  • --lines : the number of lines to display. When omitted, the program never stops.
  • --window : the number of cells to display on each line (line width). If even, the central cell is displayed in the next cell on the right. The default value is 80.
  • --move : a translation to apply on the window. If negative, the window is translated to the left. If positive, it’s translated to the right.

Bonus

Rules 0 to 255.

cd bonus
make
./wolfram --rule R [ [--start S][--lines L][--window W][--move M] ]

Contributors

  • Antoine Desruet github-link

About

The goal of this project is to implement Wolfram's elementary cellular automaton in the terminal.

Topics

Resources

License

Stars

Watchers

Forks