Skip to content

VBVR-DataFactory/O-36_grid_shift_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O-36: Grid Shift Data Generator

Generates synthetic spatial reasoning tasks where colored blocks on a grid must be moved simultaneously in a specified direction by a certain number of steps. All blocks move together while staying within grid boundaries.

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.


📌 Basic Information

Property Value
Task ID O-36
Task Grid Shift
Category Transformation
Resolution 1024×1024 px
FPS 16 fps
Duration varies
Output PNG images + MP4 video

🚀 Usage

Installation

# Clone the repository
git clone https://github.com/VBVR-DataFactory/O-36_grid_shift_data-generator.git
cd O-36_grid_shift_data-generator

# Install dependencies
pip install -r requirements.txt

Generate Data

# 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

Command-Line Options

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

📖 Task Example

Prompt

The scene shows a 5x5 grid with 8 purple square blocks, each with a black outline, positioned at various locations. All blocks must move simultaneously downward by exactly 3 steps. Each block shifts one grid cell per step toward the bottom, and all blocks must remain within the grid boundaries throughout the movement. After the movement, all blocks should be positioned exactly 3 steps downward from their original positions.

Visual

Initial Frame
Blocks at starting positions
Animation
All blocks move simultaneously
Final Frame
Blocks after shift transformation

📖 Task Description

Objective

Move all blocks on a grid simultaneously in a specified direction (up, down, left, or right) by a given number of steps, ensuring all blocks remain within the grid boundaries.

Task Setup

  • Grid Size: Randomly selected from 4×4 to 24×24
  • Number of Blocks: 2 to 40% of grid cells, with colored square blocks
  • Block Colors: Various colors with black outlines for visibility
  • Movement Direction: Up, down, left, or right
  • Step Count: 1-3 steps (automatically limited by grid size)
  • Boundary Constraint: All blocks must stay within grid after movement

Key Features

  • Simultaneous movement: All blocks move together as a coordinated group
  • Direction consistency: All blocks move in the same direction
  • Step uniformity: Every block moves the same number of steps
  • Boundary awareness: Tests understanding of spatial constraints and valid movements
  • Grid-based reasoning: Requires discrete spatial transformation on a regular grid
  • Variable complexity: Grid size and block count scale difficulty
  • Uniform transformation: Translation applied equally to all blocks

📦 Data Format

data/questions/grid_shift_task/grid_shift_00000000/
├── first_frame.png      # Initial state (blocks at starting positions)
├── final_frame.png      # Final state (blocks after shift)
├── prompt.txt           # Task instructions with parameters
├── 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 by number of steps.


🏷️ Tags

spatial-reasoning grid-transformation simultaneous-movement boundary-constraints translation discrete-space coordinate-transformation


About

This is a grid shift data generator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages