Implementation:Open compass VLMEvalKit VGRPBench Aquarium
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, Evaluation, Puzzle_Solving |
Overview
Implements constraint checking and puzzle factory for the Aquarium grid puzzle in VGRPBench.
Description
This module defines constraint validators and a puzzle factory for the Aquarium puzzle type. The ConstraintAquariumFill class enforces water-fill rules ensuring that within each aquarium region, all cells at or below the highest water level are filled and cells within the same row of an aquarium share the same state. The ConstraintAquariumCount class verifies that row and column water counts match the given clues, while AquariumPuzzleFactory orchestrates constraint checking and possible value enumeration.
Usage
Called internally by VGRPBench evaluation pipeline for puzzle constraint verification.
Code Reference
- Source:
vlmeval/dataset/utils/vgrpbench/puzzles/aquarium.py, Lines: L1-115 - Import:
from vlmeval.dataset.utils.vgrpbench.puzzles.aquarium import AquariumPuzzleFactory
Key Classes:
class ConstraintAquariumFill(Constraint): ...
class ConstraintAquariumCount(Constraint): ...
class AquariumPuzzleFactory(PuzzleFactory): ...
I/O Contract
| Direction | Description |
|---|---|
| Inputs | Puzzle grid state with board, aquarium regions, and row/column count clues |
| Outputs | Boolean validation result or constraint violations |
Usage Examples
# Internal usage
from vlmeval.dataset.utils.vgrpbench.puzzles.aquarium import AquariumPuzzleFactory
factory = AquariumPuzzleFactory(size=6)
result = factory.check(game_state)