By Nigel Perks, 2026.
See Nigel Cutland, "Computability", pp. 52-57.
If you use the source, please preserve the original author name and date.
A Turing Machine has a set of states and an indefinitely long tape. The tape is divided into cells. Each cell contains a symbol or blank. The machine has a current state and a current position on the tape (current cell). At each step in its execution, the machine reads the symbol in the current cell. Depending on the current state and current symbol, the machine can write a replacement symbol, move left or right along the tape, and transition to a new state. Certain states can be denoted accept or reject states, to stop the machine successfully or with an error respectively. One state is denoted the start state.
A Turing Machine specification for this simulator consists of lines of text in five fields:
- state
- symbol
- new symbol
- move (L/R/N)
- new state
This simulator treats underscore as a visible representation of a blank.
Directives .start, .accept, .reject
denote the start state, an accept state, and a reject state respectively.
If there is no explicit start state,
the first state in the specification is the start state.
See the EXAMPLES.