Generates synthetic block rearrangement tasks following Tower of Hanoi-style rules. The task is to rearrange colored blocks from a current state to match a target state, moving only the topmost block of any stack at a time.
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 | O-22 |
| Task | Construction Stack |
| Category | Transformation |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | varies |
| Output | PNG images + MP4 video |
# Clone the repository
git clone https://github.com/VBVR-DataFactory/O-22_construction_stack_data-generator.git
cd O-22_construction_stack_data-generator
# Install dependencies
pip install -r requirements.txt# Generate 100 samples
python examples/generate.py --num-samples 100
# Generate with specific seed
python examples/generate.py --num-samples 100 --seed 42
# Generate without videos
python examples/generate.py --num-samples 100 --no-videos
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_output| Argument | Type | Description | Default |
|---|---|---|---|
--num-samples |
int | Number of samples to generate | 100 |
--seed |
int | Random seed for reproducibility | Random |
--output |
str | Output directory | data |
--no-videos |
flag | Skip video generation | False |
Rearrange the block stacks to match the target state. Only the topmost block can be moved at any time. Use the available stacks strategically to minimize moves. Plan your moves carefully before starting.
![]() |
![]() |
![]() |
| Initial Frame Current state (left) and target state (right) |
Animation Blocks being moved one by one |
Final Frame Target state achieved |
Rearrange colored blocks from the current configuration to match the target configuration, following Tower of Hanoi rules: only the topmost block of any stack can be moved at a time.
- Block Stacks: 2-3 stacks available for placing blocks
- Colored Blocks: 3-5 blocks in different colors (red, blue, green, yellow, purple, orange)
- Movement Rule: Only the top block from any stack can be moved
- Move Animation: Each move consists of three phases: lift up, move horizontally, lower down
- Goal: Transform current state to exactly match target state
- Optimization: Minimize the total number of moves required
- Sequential planning: Tests ability to plan multi-step sequences to achieve goal
- Tower of Hanoi mechanics: Only top blocks can be moved, requiring strategic intermediate moves
- State space search: Must explore possible moves to find efficient solution path
- Constraint satisfaction: Movements must obey the top-block-only rule
- Visual tracking: Requires tracking multiple blocks across different stacks
- Move optimization: Encourages finding shortest solution path
- Smooth animation: Each move clearly shows lift, translate, and lower phases
data/questions/construction_stack_task/construction_stack_00000000/
├── first_frame.png # Initial state (current + target configurations)
├── final_frame.png # Final state (target achieved)
├── prompt.txt # Task instructions
├── ground_truth.mp4 # Solution video (16 fps)
└── question_metadata.json # Task metadata
File specifications: Images are 1024×1024 PNG. Videos are MP4 at 16 fps, duration varies based on number of moves required.
planning sequential-reasoning tower-of-hanoi block-rearrangement constraint-satisfaction state-space-search optimization


