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 OddEvenSudoku

From Leeroopedia
Revision as of 13:32, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Open_compass_VLMEvalKit_VGRPBench_OddEvenSudoku.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 Odd-Even Sudoku variant in VGRPBench.

Description

This module defines constraint validators and a puzzle factory for the Odd-Even Sudoku puzzle type, extending standard Sudoku with parity constraints on cells. The ConstraintOddEven class ensures cells marked 'w' (white) contain even numbers and cells marked 'b' (black) contain odd numbers. The module also provides local ConstraintRowNoRepeat, ConstraintColNoRepeat, and ConstraintSubGridNoRepeat classes for standard Sudoku uniqueness rules. The OddEvenSudokuPuzzleFactory filters possible values based on cell parity type before constraint checking.

Usage

Called internally by VGRPBench evaluation pipeline for puzzle constraint verification.

Code Reference

  • Source: vlmeval/dataset/utils/vgrpbench/puzzles/oddevensudoku.py, Lines: L1-117
  • Import: from vlmeval.dataset.utils.vgrpbench.puzzles.oddevensudoku import OddEvenSudokuPuzzleFactory

Key Classes:

class ConstraintOddEven(Constraint): ...
class ConstraintRowNoRepeat(Constraint): ...
class ConstraintColNoRepeat(Constraint): ...
class ConstraintSubGridNoRepeat(Constraint): ...
class OddEvenSudokuPuzzleFactory(PuzzleFactory): ...

I/O Contract

Direction Description
Inputs Puzzle grid state with board, cell_types parity matrix ('w' for even, 'b' for odd), and numeric values
Outputs Boolean validation result or constraint violations

Usage Examples

# Internal usage
from vlmeval.dataset.utils.vgrpbench.puzzles.oddevensudoku import OddEvenSudokuPuzzleFactory
factory = OddEvenSudokuPuzzleFactory(size=9)
result = factory.check(game_state)

Related Pages

Page Connections

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