Skip to content

MichaelHi/Rule110

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Rule 110 Cellular Automata

This is code aims to provide a simple implementation of the Rule 110 Automata. It is also a personal excercise with the aim to learn Haskell, which means that the implementation will probably be not so good.

Rule 110 is a one of the 256 possible 1-dimensional cellular automata, made famous by Stephen Wolfram in his book `A New Kind of Science' and proven to be Turing Complete by Cook and Wolfram. You can find more information about it on Wikipedia and Wolfram Alpha;

Usage

Compile the code by running

make

then you can execute the binary as

./rule110 size step

where size is how many columns(i.e. cells) there will be and steps is the number of times the function program will be applied.

Output

The output of the program is a simple image using the NetBPM P1 format, a simple image viewer like feh, eog or sxiv can open it or you can convert it to a png using ImageMagick. Each step is printed in the file, where the i-th step will be in the i+1th line, since the first one is the original state. The image will contain size columns and step+1 lines.

About

Simple implementation of rule 110 made with Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 94.0%
  • Makefile 6.0%