Generates synthetic datasets for Langton's Ant cellular automaton simulation. The agent must faithfully execute a deceptively simple two-rule system on a 2D grid for many steps — producing complex, emergent trajectories that test long-horizon deterministic execution.
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-20 |
| Task | Langton's Ant Simulation |
| 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-20_langtons_ant_simulation_data-generator.git
cd Multi-20_langtons_ant_simulation_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 shows a grid of black and white cells with an ant facing a specific direction.
[Rules]
1. On a white cell, turn 90 degrees right, flip that cell to black, and move forward one cell.
2. On a black cell, turn 90 degrees left, flip that cell to white, and move forward one cell.
3. If the next move would leave the board, stop immediately.
[Task] Generate a video animating the ant's movement step-by-step according to the rules for a given number of steps. The final frame must clearly show the ending grid pattern, the ant's final position, and its final facing direction.
![]() |
![]() |
![]() |
| Initial Frame Initial board + ant position + heading |
Animation Step-by-step rule execution + cell flipping |
Final Frame Final board pattern + ant position |
Run Langton's Ant on a small 2D grid for a fixed number of steps, applying the two-rule system at each step until the move budget is exhausted or the next step would carry the ant off the board.
- Grid: 6×6 to 9×9 cells (white or black).
- Ant: Starts at a fixed position with one of 4 initial headings (up/down/left/right).
- Rules (Langton's Ant):
- White cell: Turn right, flip cell to black, advance one cell.
- Black cell: Turn left, flip cell to white, advance one cell.
- Steps: 8–18 deterministic transitions.
- Boundary: If the next move would leave the board, the ant halts.
- Two-rule deterministic system: Among the simplest possible Turing-machine-equivalent rules — yet generates highly non-trivial trajectories.
- Bidirectional state-cell coupling: The ant's heading depends on cells (state ← board), and the board depends on the ant's footprint (board ← state). Mutual updating across long horizons.
- Emergent complexity: Even simple rules yield cycles, "highway" behavior, and chaotic trails — models cannot shortcut by pattern guess.
- Frame-perfect intermediate states: Each step shows the cell flip, ant move, and heading change — directly evaluable.
data/questions/Multi-20_langtons_ant_simulation_data-generator_task/Multi-20_langtons_ant_simulation_data-generator_00000000/
├── first_frame.png # Initial board + ant position
├── final_frame.png # Final board + ant position
├── prompt.txt # Task instruction with rules
├── 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
langtons-ant cellular-automaton algorithmic-execution simulation deterministic emergent-complexity long-horizon multi-step-reasoning
Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.


