Skip to content

VBVR-DataFactory/O-31_ball_eating_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O-31: Ball Eating Data Generator

Generates synthetic strategy game tasks where a black ball must eat other colored balls to grow. The task requires finding the correct sequence to eat all balls, following the rule that you can only eat balls smaller than or equal to your current size.

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-31
Task Ball Eating
Category Perception
Resolution 1024×1024 px
FPS 16 fps
Duration ~7 seconds max
Output PNG images + MP4 video

🚀 Usage

Installation

# Clone the repository
git clone https://github.com/VBVR-DataFactory/O-31_ball_eating_data-generator.git
cd O-31_ball_eating_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

In the scene, there is a black ball and several colored balls of different sizes. The black ball can eat balls that are smaller than itself. After eating a ball, the black ball grows larger. Find the correct sequence to eat all colored balls step by step.

Visual

Initial Frame
Black ball with various colored balls
Animation
Black ball eats others sequentially
Final Frame
Large black ball remains

📖 Task Description

Objective

Control the black ball to eat all colored balls by finding the correct eating sequence, following the constraint that you can only eat balls smaller than or equal to your current size.

Task Setup

  • Multiple Balls: Black ball plus 2-6 colored balls of varying sizes
  • Black Ball: Starting ball that grows by eating others
  • Size Constraint: Can only eat balls smaller than or equal to current size
  • Ball Sizes: Range from 40 to 220 pixels
  • Growth Factor: Black ball grows by 1.5x after each consumption
  • Strategic Planning: May require eating balls in specific order

Key Features

  • Sequential strategy: Tests planning ability to order consumption moves correctly
  • Size comparison: Requires tracking and comparing ball sizes dynamically
  • Growth mechanic: Black ball grows with each successful consumption
  • Constraint satisfaction: Must respect the "smaller or equal size only" rule at each step
  • Dynamic state: Ball sizes change as eating occurs
  • Backward-solving: Generator ensures all tasks are solvable
  • Victory condition: Task complete when all colored balls are eaten
  • Order dependency: Some sequences work while others fail due to size constraints

📦 Data Format

data/questions/ball_eating_task/ball_eating_00000000/
├── first_frame.png      # Initial state (black + colored balls)
├── final_frame.png      # Final state (only large black ball)
├── prompt.txt           # Task instructions
├── ground_truth.mp4     # Solution video (16 fps, max 7 seconds)
└── question_metadata.json # Task metadata

File specifications: Images are 1024×1024 PNG. Videos are MP4 at 16 fps, maximum duration 7 seconds.


🏷️ Tags

strategy sequential-planning size-comparison eating-mechanic growth-strategy constraint-satisfaction order-dependency


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages