Simple Turing Machine Simulator

How the Turing machine works (quick overview)

A Turing machine is a simple computational model with: - a tape (infinite in both directions conceptually) holding symbols, - a tape head that reads/writes a single cell and can move left or right, - a finite set of states with one start state, and - transition rules that say: given the current state and current symbol, write a symbol, move the head (L/R/Stay), and switch to a new state.

The simulator here uses a left-to-right array for the tape (it grows automatically when the head moves past either end). Provide: - Alphabet: comma-separated symbols (include the blank symbol), - Tape contents: initial symbols (left-to-right), - States: comma-separated state names, - Start state and blank symbol, - Transitions: one per line in the form: currentState,currentSymbol -> newState,newSymbol,move where move is L, R or S (stay).

Use Load to parse the machine, Step to run one transition, Run to execute repeatedly (Pause to stop), and Reset to restore the loaded initial tape/state.

Example: 0,1,_ — include the blank symbol (or set it below)
Tape is shown as cells. The head starts at position 0 (leftmost) unless you change Head position after loading.
First state will be used as default start state unless changed below.
Example format: q0,1 -> q1,0,R (comma-separated, arrow can be -> or =>, move is L, R or S)
Current state:
Step: 0
Head pos:
Last action: