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 Hitori

From Leeroopedia
Revision as of 13:32, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Open_compass_VLMEvalKit_VGRPBench_Hitori.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source VLMEvalKit
domain Vision, Evaluation, Puzzle_Solving

Overview

Implements constraint checking and puzzle factory for the Hitori shading puzzle in VGRPBench.

Description

This module defines constraint validators and a puzzle factory for the Hitori puzzle type, where cells are shaded or unshaded to eliminate duplicate numbers in rows and columns. The ConstraintHitoriNoRepeat class ensures no duplicate numbers appear among unshaded cells in any row or column. The ConstraintHitoriAdjacent class prevents two shaded cells from being orthogonally adjacent. The ConstraintHitoriConnected class uses BFS to verify all unshaded cells form a single connected component.

Usage

Called internally by VGRPBench evaluation pipeline for puzzle constraint verification.

Code Reference

  • Source: vlmeval/dataset/utils/vgrpbench/puzzles/hitori.py, Lines: L1-109
  • Import: from vlmeval.dataset.utils.vgrpbench.puzzles.hitori import HitoriPuzzleFactory

Key Classes:

class ConstraintHitoriNoRepeat(Constraint): ...
class ConstraintHitoriAdjacent(Constraint): ...
class ConstraintHitoriConnected(Constraint): ...
class HitoriPuzzleFactory(PuzzleFactory): ...

I/O Contract

Direction Description
Inputs Puzzle grid state with board (shading state) and numbers matrix for the underlying grid values
Outputs Boolean validation result or constraint violations

Usage Examples

# Internal usage
from vlmeval.dataset.utils.vgrpbench.puzzles.hitori import HitoriPuzzleFactory
factory = HitoriPuzzleFactory(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