TuringMachine
A man provided with paper, pencil, and rubber, and subject to strict discipline, is in effect a universal machine. — Alan Turing
A Turing machine that can run (almost) (one day maybe) (I hope) any instruction set.
Installation
Install it with:
$ gem install turing_machine
Usage
Look at some well-known instruction sets in instruction_sets or create your own. Then run the Turing machine with, for example:
$ turing_machine instruction_sets/busy_beaver_1
To initialize the tape with some data, use --tape
:
$ turing_machine instruction_sets/copy --tape 111
Finally, look at the InstructionsParser class for a documentation of the instruction format if you want to write your own.
Contributing
- Fork it ( https://github.com/lkdjiin/turing_machine/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
MIT, see LICENSE.TXT
Questions and/or Comments
Feel free to email Xavier Nayrac with any questions, or contact me on twitter.