Generates synthetic datasets for the Eulero puzzle — a graphical realization of two orthogonal Latin squares (also known as Graeco-Latin squares). Each cell holds a letter–number pair where letters and numbers each form their own Latin square, and all letter–number pairs across the grid are distinct.
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-16 |
| Task | Orthogonal Latin Square (Eulero) |
| Category | Constraint Satisfaction Puzzles |
| 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-16_orthogonal_latin_square_data-generator.git
cd Multi-16_orthogonal_latin_square_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 an NxN Eulero (Orthogonal Latin Square) puzzle grid with some pre-filled letter-number pairs (e.g., A1, B2).
[Rules]
1. Each cell must contain exactly one letter-number pair.
2. Each letter must appear exactly once in every row and every column.
3. Each number must appear exactly once in every row and every column.
4. Each letter-number pair must be unique across the entire grid.
[Task] Generate a video showing the solution to the Eulero puzzle. Animate the step-by-step placement of the correct letter-number pairs into the empty cells, strictly filling them from top-to-bottom and left-to-right, until the grid is complete.
![]() |
![]() |
![]() |
| Initial Frame Partial Eulero grid with given clues |
Animation Cells filled to satisfy all four constraints |
Final Frame Two orthogonal Latin squares visible |
Complete an NxN grid where each cell holds a letter–number pair such that letters form a Latin square, numbers form a second Latin square, and the two are orthogonal (every letter–number pair appears at most once across the whole grid).
- Grid: NxN cells, where N is typically 4 to 6.
- Alphabet & digits: Letters {A, B, …, N-th} and digits {1, …, N}.
- Latin square constraint (×2): Each letter and each digit appears exactly once per row and per column.
- Orthogonality constraint: Across all N² cells, no letter–number pair repeats.
- Givens: A subset of cells start with fixed pairs (uniquely-solvable puzzles, verified via solver).
- Two stacked Latin-square constraints: Each cell must simultaneously satisfy two independent row/column uniqueness systems.
- Combinatorial coupling: The orthogonality requirement entangles the two squares — placing A1 forbids both A in that row/col and 1 in that row/col, and the pair (A,1) anywhere else.
- Higher-order CSP: Computationally harder than Sudoku because constraint count scales as O(N³) vs Sudoku's O(N²).
- Visible deduction: Cells are filled in a logically valid order; intermediate state correctness is checkable per frame.
data/questions/Multi-16_orthogonal_latin_square_data-generator_task/Multi-16_orthogonal_latin_square_data-generator_00000000/
├── first_frame.png # Partial grid with clues
├── final_frame.png # Fully solved orthogonal Latin square
├── prompt.txt # Task instruction with full ruleset
├── ground_truth.mp4 # Animation of stepwise filling
└── 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
eulero orthogonal-latin-square graeco-latin-square csp logic-puzzle combinatorial multi-step-reasoning
Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.


