Generates synthetic datasets for 2D Turing-machine grid execution. The agent must mentally simulate a small finite-state machine running on a colored grid: read the head's current cell, look up the transition rule, write the new symbol, move the head, and update the machine state — repeated for several steps.
Each sample pairs a task (first frame + prompt describing what needs to happen) with its ground truth solution (final frame showing the result + video demonstrating how to achieve it). This structure enables both model evaluation and training.
| Property | Value |
|---|---|
| Task ID | Multi-19 |
| Task | Turing Machine Execution |
| Category | Algorithmic Execution |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | varies |
| Output | PNG images + MP4 video |
# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/Multi-19_turing_machine_execution_data-generator.git
cd Multi-19_turing_machine_execution_data-generator
# 2. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .# Generate 50 samples
python examples/generate.py --num-samples 50
# Reproducible generation with seed
python examples/generate.py --num-samples 50 --seed 42
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_dataset
# Without videos (faster, images only)
python examples/generate.py --num-samples 50 --no-videos| Argument | Description |
|---|---|
--num-samples |
Number of tasks to generate (required) |
--output |
Output directory (default: data/questions) |
--seed |
Random seed for reproducibility |
--no-videos |
Skip video generation (images only) |
[Scenario] The image displays a 2D colored grid with a Turing machine head at a specific starting cell. The machine is currently in state 1.
[Rules]
The machine executes the following exact sequence of steps:
Step 1: In state 1, reading magenta -> write cyan, move up, goto state 0
Step 2: In state 0, reading green -> write magenta, move right, goto state 1
Step 3: In state 1, reading green -> write magenta, move left, goto state 2
Step 4: In state 2, reading magenta -> write cyan, move right, goto state 1
Step 5: In state 1, reading magenta -> write cyan, move up, goto state 0
1. At each step, the head reads the color of its current cell and applies the matching rule.
2. The rule dictates the new color to write, the direction to move, and the next state to enter.
3. If a move would cause the head to leave the board, the machine halts immediately.
[Task] Generate a video simulating the 2D Turing machine for exactly 5 steps. Animate the head writing colors, moving, and changing states step-by-step. Hold the final frame to clearly show the resulting grid colors and the final head position.
![]() |
![]() |
![]() |
| Initial Frame Grid + transition rule table + head position |
Animation Step-by-step rule application: read → write → move → state-change |
Final Frame Final tape state + head location |
Simulate a 2D Turing-machine for a fixed number of steps on a small colored grid, where each step reads the cell under the head, writes a new color, moves the head one cell in a direction, and transitions to a new internal state.
- Grid: 4×4 to 6×6 cells, each holding a colored symbol (red / green / blue / cyan / magenta).
- Machine state: 3 to 5 internal states.
- Transition table: For each (state, read-symbol), specifies (write-symbol, move-direction, next-state).
- Head: Marked visibly on the grid, with current state displayed.
- Steps: 4 to 8 deterministic transitions.
- Boundary mode: Halt at edge (head stops if it would move off-grid).
- Pure deterministic execution: No search / planning — only faithful simulation of the rules.
- Compounding state mutation: Each step mutates both the tape (cell color) and the machine state, with full history of dependencies.
- Long-horizon symbolic tracking: A model must track grid colors, head position, and internal state simultaneously across all steps.
- Frame-perfect intermediate states: The video reveals the tape & head & state after each transition, enabling stepwise evaluation.
data/questions/turing_machine_grid_transition_task/Multi-19_turing_machine_execution_data-generator_00000000/
├── first_frame.png # Initial grid + transition table + head
├── final_frame.png # Final grid state + head + state
├── prompt.txt # Task instruction
├── ground_truth.mp4 # Animation of stepwise execution
└── question_metadata.json # Standardized VBVR task metadata
File specifications:
- Images: 1024×1024 PNG format
- Video: MP4 format, 16 fps, H.264 + yuv420p
- Metadata: VBVR canonical schema with
task_id,vbvr_task_code,media,parameters
turing-machine state-machine algorithmic-execution simulation deterministic long-horizon multi-step-reasoning
Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.


