Turing Machine Simulator

Import

From Local Files

Supported file types: .json, .jsonl, .yaml, .txt

Click to select or drag & drop files here

Model Preview

Export

File Preview
Ticker Tape
Configure Model
Control Machine

For advanced control, see Turing Config.

Model Summary
πŸ“– What is a Turing Machine?

A Turing machine is an abstract device that models computation by manipulating symbols on a tape. Learn more

Each machine has a finite number of states and symbols, fixed at startup. The tape is infinite and is blank where unused.

Formal Definition

A Turing machine is defined by the tuple:

M = ⟨ Q, Γ, b, Σ, δ, q0, F ⟩

  • Q – a set of all possible states the machine can be in.
  • Ξ“ – a set of symbols that can appear on the tape (the tape alphabet).
  • b – a special blank symbol used to fill the rest of the tape.
  • Ξ£ – a set of input symbols (a subset of the tape alphabet, but doesn’t include the blank symbol).
  • q0 – the starting state where the machine begins.
  • F – a set of final (accepting) states. If the machine stops in one of these, the input is accepted.
  • Ξ΄ (the transition function) – rules that tell the machine based on current state:
    • what state to move to next,
    • what symbol to write on the tape, and
    • whether to move left or right on the tape.
    If halt state reached, the machine stops.

For a great introduction, see the Stanford Encyclopedia of Philosophy entry.

πŸ›  Try It Out

Configure your Turing machine and simulate its operation with these steps:

1. Configure Your Machine
  • Name your model in the top-right input
  • Write transition rules in the editor
  • Set initial tape content
2. Transition Rule Format
currentState currentSymbol newState newSymbol dir

Example: INIT 0 WRITE 1 R
Comments start with // (configurable)

3. Run the Simulation
  • Jump - Execute multiple steps at once
  • Play/Pause - Run continuously or pause
  • Reset - Return to initial configuration
  • Seek - Jump to specific step in history
4. Visualize & Export
  • Watch the tape update in real-time
  • Use the history slider to review steps
  • Create animated GIFs of the computation
  • Export models in JSON/YAML/TXT formats
βš™οΈ Turing Config
    Machine Defaults:
  • Machine Limits:
Ready for a challenge? Test your Turing Machine Skills against other programmers in competitive puzzles at Marches & Gnats