Skip to content

VBVR-DataFactory/Multi-18_tents_and_trees_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-18: Tents and Trees (Campsite) Data Generator

Generates synthetic datasets for the Tents-and-Trees (Campsite) puzzle. The agent must place tents on a grid such that each tent is orthogonally adjacent to a tree, no two tents touch (even diagonally), and per-row/per-column tent counts match the given constraints — a classical CSP combining adjacency, exclusion, and counting constraints.

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 Multi-18
Task Tents and Trees (Campsite)
Category Constraint Satisfaction Puzzles
Resolution 1024×1024 px
FPS 16 fps
Duration varies
Output PNG images + MP4 video

🚀 Usage

Installation

# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/Multi-18_tents_and_trees_data-generator.git
cd Multi-18_tents_and_trees_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

# 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

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

[Scenario] The image shows a Campsite (Tents and Trees) puzzle grid containing trees, with numeric constraints given for each row and column.
[Rules]
1. Exactly one tent must be placed for each tree, and it must be orthogonally adjacent (up, down, left, right) to its tree.
2. No two tents can be placed in adjacent cells, not even diagonally.
3. The total number of tents in each row and column must exactly match the given numeric constraints.
[Task] Generate a video solving the Campsite puzzle. Animate the step-by-step placement of the tents into the correct empty cells, proceeding sequentially from top-to-bottom and left-to-right, until all constraints are met.

Visual

Initial Frame
Trees scattered + row/column tent counts
Animation
Tents placed cell-by-cell satisfying constraints
Final Frame
All tents placed; counts and adjacency satisfied

📖 Task Description

Objective

Place tents on empty grid cells so that (1) each tent is orthogonally adjacent to at least one tree, (2) no two tents touch even diagonally, and (3) the per-row and per-column tent counts equal the labels printed alongside the grid.

Task Setup

  • Grid: NxN cells with trees pre-placed at fixed positions.
  • Constraints printed: One number per row and per column = required tent count.
  • Adjacency: Each tent must touch at least one tree (4-connected).
  • Exclusion: Tents cannot touch each other in any of the 8 directions.
  • Pairing: Implicitly, every tree corresponds to exactly one tent (puzzles guarantee #trees = sum of tent counts).
  • Solver: Backtracking with constraint propagation produces the unique solution.

Key Features

  • Triple constraint type: Adjacency, exclusion, and counting must all hold simultaneously.
  • Mixed local + global reasoning: Adjacency is per-tree (local), exclusion is per-cell (local), counts are per-row/column (global).
  • Forced placements via row/column saturation: When a row's count equals available cells, all positions are determined — chain reactions follow.
  • Visible commitment: Each new tent placement must respect previously placed tents and the printed counts; intermediate states are checkable per frame.

📦 Data Format

data/questions/Multi-18_tents_and_trees_data-generator_task/Multi-18_tents_and_trees_data-generator_00000000/
├── first_frame.png            # Trees + row/col tent count constraints
├── final_frame.png            # All tents placed, all constraints satisfied
├── prompt.txt                 # Task instruction with full ruleset
├── ground_truth.mp4           # Animation of stepwise tent placement
└── 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

🏷️ Tags

tents-and-trees campsite csp logic-puzzle adjacency-constraint counting-constraint multi-step-reasoning


Part of the 36-Task Long-Horizon Multi-Step Reasoning Benchmark.

About

Multi-18: tents and trees data generator — Constraint Satisfaction Puzzles domain of the 36-task Long-Horizon Multi-Step Reasoning Benchmark.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages