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 Renzoku

From Leeroopedia
Field Value
source VLMEvalKit
domain Vision, Evaluation, Puzzle_Solving

Overview

Implements constraint checking and puzzle factory for the Renzoku consecutive-number puzzle in VGRPBench.

Description

This module defines constraint validators and a puzzle factory for the Renzoku puzzle type, where cells contain unique numbers per row and column with adjacency hints indicating consecutive values. The ConstraintRowNoRepeat and ConstraintColNoRepeat classes enforce Latin square uniqueness. The ConstraintAdjacency class validates that cells marked with "1" hints between them differ by exactly one, checking both row-wise and column-wise adjacency hint matrices. The RenzokuPuzzleFactory supports grid sizes from 4 to 12.

Usage

Called internally by VGRPBench evaluation pipeline for puzzle constraint verification.

Code Reference

  • Source: vlmeval/dataset/utils/vgrpbench/puzzles/renzoku.py, Lines: L1-106
  • Import: from vlmeval.dataset.utils.vgrpbench.puzzles.renzoku import RenzokuPuzzleFactory

Key Classes:

class ConstraintRowNoRepeat(Constraint): ...
class ConstraintColNoRepeat(Constraint): ...
class ConstraintAdjacency(Constraint): ...
class RenzokuPuzzleFactory(PuzzleFactory): ...

I/O Contract

Direction Description
Inputs Puzzle grid state with board and hints dictionary containing row and column adjacency matrices
Outputs Boolean validation result or constraint violations

Usage Examples

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