Implementation:Open compass VLMEvalKit VGRPBench Renzoku
| 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)