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.
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.
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.
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.