Skip to content

Generates a random 2d turing machine and simulates it

License

Notifications You must be signed in to change notification settings

ehulinsky/random-turing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

random-turing

Generates a random 2d turing machine and simulates it. Also contains a program that tries to filter binary counters by comparing their growth to logarithmic.

Turing machine model

The Turing machine has n states and no halt state. It can move in any cardinal direction or stay still. If it reaches the edge of the square, it wraps around like a torus.

The transition table is generated by choosing a (random state, random bit to write, random direction) for each (state, value) pair.

Usage

Requires pygame library, install with pip.

Run turing.py to run a random turing machine, and set the seed at the top of the program to run a specific machine.

Run turingmachine.py to begin searching for binary counter programs. Will output the seed and the mean squared error comparing growth to log2(x). Lower numbers are more likely to be binary counters.

Examples

These are all examples of randomly generated turing machines in operation.

New feature: State transition visualization. Each dot in the circle represents a state. The white dot shows the current state, and the line comes from the previous state.

About

Generates a random 2d turing machine and simulates it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages