Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Open compass VLMEvalKit VGRPBench Thermometers

From Leeroopedia
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)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment