Implementation:Open compass VLMEvalKit VGRPBench Thermometers
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, Evaluation, Puzzle_Solving |
Overview
Implements constraint checking and puzzle factory for the Thermometers fill puzzle in VGRPBench.
Description
This module defines constraint validators and a puzzle factory for the Thermometers puzzle type, where thermometer shapes on a grid must be filled from the bulb end without gaps. The ConstraintThermometerFill class ensures that within each thermometer, cells are filled consecutively from the bulb and that no non-thermometer cells are marked as filled. The ConstraintThermometerCount class validates that the count of filled cells in each row and column matches the provided clue values. The ThermometersPuzzleFactory requires a minimum grid size of 4.
Usage
Called internally by VGRPBench evaluation pipeline for puzzle constraint verification.
Code Reference
- Source:
vlmeval/dataset/utils/vgrpbench/puzzles/thermometers.py, Lines: L1-108 - Import:
from vlmeval.dataset.utils.vgrpbench.puzzles.thermometers import ThermometersPuzzleFactory
Key Classes:
class ConstraintThermometerFill(Constraint): ...
class ConstraintThermometerCount(Constraint): ...
class ThermometersPuzzleFactory(PuzzleFactory): ...
I/O Contract
| Direction | Description |
|---|---|
| Inputs | Puzzle grid state with board and clues dictionary containing thermometers list, row_counts, and col_counts |
| Outputs | Boolean validation result or constraint violations |
Usage Examples
# Internal usage
from vlmeval.dataset.utils.vgrpbench.puzzles.thermometers import ThermometersPuzzleFactory
factory = ThermometersPuzzleFactory(size=5)
result = factory.check(game_state)