A visualization of a 3-symbol, 3-state Turing machine.
turing completehashes to the following:
We divvy this hash up into several parameters:
α0 66a775 β0 09eaf0 γ0 d85898 α1 12c53d β1 acb80e γ1 bb5f98 α2 f16dc0 β2 6b6ae6 γ2 5f3bd6 input 7a5a00937e
Our machine has a head which can read and write values 0, 1, and 2 from an infinite tape (represented by a white square, a gray square, and a black square respectively). The head itself can be in one of three states α, β, and γ. It starts at state α.
α0means “for state
αand a value
0on the tape.” The segment of the hash for field
66a775) is then split into 3 bytes (
75) to generate a triple with the following:
Write (which state should we write to the tape? 0, 1, or 2)
Move (should we move the head left or right?)
State (which state should we set the head to? α, β, or γ)
Repeat this for each of the fields to finish building the transition table.
To keep things interesting, we seed the tape with some initial squares based on
input. (We convert
inputto base 3 and read off the digits to set the tape).
Then we start writing . After each step, we draw the tape and the position of the cursor with a little ▼.
The results are not super interesting - 3 states and 3 symbols just isn’t that much to work with - but each piece looks pretty unique and that’s plenty interesting to me.