Skip to content

VBVR-DataFactory/G-41_grid_highest_cost_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G-41: Grid Highest Cost Data Generator

Generates synthetic datasets for training and evaluating vision models on pathfinding and optimization tasks. Each sample contains a grid with cost values where an agent must find the path from start to goal with the maximum total cost.

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 G-41
Task Grid Highest Cost
Category Abstraction
Resolution 1024×1024 px
FPS 16 fps
Duration ~6 seconds
Output PNG images + MP4 video

🚀 Usage

Installation

# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/G-41_grid_highest_cost_data-generator.git
cd G-41_grid_highest_cost_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 Data

# Generate 50 samples
python examples/generate.py --num-samples 50

# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_dataset

# Reproducible generation with seed
python examples/generate.py --num-samples 50 --seed 42

# Without videos (faster)
python examples/generate.py --num-samples 50 --no-videos

Command-Line Options

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)

📖 Task Example

Prompt

The scene shows a 4x4 grid with cost values displayed in each cell, a green start cell (containing a yellow Pac-Man agent) at the top-left, and a red goal cell at the bottom-right. Starting from the green start cell, the agent can move to adjacent cells (up, down, left, right) one step at a time. Move the agent to the red goal cell along the path with the highest total cost (the sum of all cost values of cells visited along the path), showing the complete movement process step by step.

Visual

Initial Frame
Agent at green start, grid with costs visible
Animation
Agent follows highest-cost path to goal
Final Frame
Agent reaches red goal via max-cost path

📖 Task Description

Objective

Navigate a grid from start to goal by finding the path that maximizes the total sum of cell cost values.

Task Setup

  • Grid size: 4×4 cells with numerical cost values
  • Start position: Green cell (top-left) with yellow Pac-Man agent
  • Goal position: Red cell (bottom-right)
  • Movement: Adjacent cells only (up, down, left, right)
  • Optimization goal: Maximize total cost (opposite of shortest path)
  • Cost values: Displayed in each cell
  • Goal: Find and traverse the highest-cost path

Key Features

  • Maximum cost pathfinding (reverse optimization)
  • Grid-based navigation with cost weights
  • Step-by-step movement visualization
  • Tests understanding of path optimization
  • Requires exploring multiple routes
  • Opposite of typical shortest-path problems

📦 Data Format

data/questions/grid_highest_cost_task/grid_highest_cost_00000000/
├── first_frame.png      # Grid with costs, agent at start
├── final_frame.png      # Agent at goal after max-cost path
├── prompt.txt           # Highest-cost pathfinding instruction
├── ground_truth.mp4     # Animation of agent following max-cost path
└── question_metadata.json # Task metadata

File specifications:

  • Images: 1024×1024 PNG format
  • Video: MP4 format, 16 fps
  • Duration: ~6 seconds

🏷️ Tags

graph-reasoning pathfinding optimization grid-navigation cost-maximization spatial-reasoning


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages