task_id
string
train_demonstrations_json
string
test_input_json
string
test_output_json
string
stable_instances_50_json
string
generator_py
string
verifier_py
string
t1
[{"input":[[0,0,3,0,0,0,0,2,0,0],[0,3,0,0,0,0,0,0,2,0],[3,0,0,0,0,0,0,0,0,2],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[6,0,0,0,0,0,0,0,0,1],[0,6,0,0,0,0,0,0,1,0],[0,0,6,0,0,0,0,1,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,3,2,0,0,0,0],[0,0,0,3,0,0...
[[1,0,0,0,0,0,0,0,0,0,0,2],[0,1,0,1,0,0,0,0,0,0,2,0],[0,0,1,0,0,0,0,0,0,2,0,0],[0,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,8,0,0,0,0,0,0,0,0,4,0],[0,0,8,0,0,0,0,0,0,4,0,0],[0,8,0,8,0,0,0,0,4,0,0,0],[8,0,0,0,0,0,0,0,0,0,0,0]]
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,0,2,0,0],[0,0,0,1,0,1,0,0,2,0,0,0],[0,0,0,0,1,0,0,2,0,0,0,0],[0,0,0,1,0,0,0,0,0,0,0,0],[0,0,0,8,0,0,0,0,4,0,0,0],[0,0,0,0,8,0,0,4,0,0,0,0],[0,0,0,8,0,8,4,0,0,0,0,0],[0,0,8,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,5,0],[0,0,9,0,0,0,0,0,0,0,0,0,0,5],[0,0,9,0,0,0,0,0,0,0,0,0,0,0],[9,9,9,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,9,9,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],...
"""Corner-components to center-components generator for Test2/t1. The rule matches ``Test2/t1.json``: - up to four components, one per corner window - each corner component is translated to the corresponding center window """ from __future__ import annotations import random from typing import Dict, List, Sequence, T...
"""Verifier for the Test2/t1 corner-to-center rule.""" from __future__ import annotations from typing import Dict, List, Tuple Grid = List[List[int]] def _empty(size: int) -> Grid: return [[0 for _ in range(size)] for _ in range(size)] def _corner_span(size: int) -> int: return size // 2 - 2 def _origi...
t2
[{"input":[[0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,8,8,8],[0,1,0,0,0,0,0,0,0,8],[0,0,1,0,0,0,0,0,0,8],[0,1,0,0,0,0,0,0,0,8],[0,0,1,0,0,0,0,8,8,8],[0,0,0,0,5,5,0,0,0,0],[0,0,0,0,5,5,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,8,0,0,0,0,5,5,5],[0,8,0,0,0,0,0,0,0,5],[0,0,8,0,0,0...
[[0,0,9,0,0,0,0,0,0,0],[0,9,9,0,0,0,5,0,0,0],[9,9,9,0,8,0,0,5,0,0],[0,0,0,8,0,4,0,0,5,0],[0,0,8,0,0,4,0,0,0,5],[0,8,0,4,4,4,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]
[[0,0,5,0,0,0,0,0,0,0],[0,5,5,0,0,0,4,0,0,0],[5,5,5,0,9,0,0,4,0,0],[0,0,0,9,0,8,0,0,4,0],[0,0,9,0,0,8,0,0,0,4],[0,9,0,8,8,8,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,6,6,6,6,0,0,0,0,0,0,0],[0,0,0,6,0,0,0,6,0,0,0,0,0,5],[0,0,0,0,0,0,0,0,0,0,0,0,5,0],[0,0,0,0,0,0,0,0,0,0,4,0,0,0],[0,0,0,0,0,0,0,0,0,4,0,0,0,0],[0,0,0,0,0,0,0,0,0,4,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,8,0,0,0,9,0,0,0,0,0,0,0,0],[0,8,0,0,9,0,0,0,0,0,0,0,0,0],[0,0,8,0,9,0,0,0,0,0,0,0,0,0],...
"""Generator for Test2/t2: cyclic color shift by leftmost-object order. Rule: - detect 8-connected non-zero objects - sort objects by the position of their leftmost cell (col, then row) - shift object colors to the right with wrap-around """ from __future__ import annotations import random from typing import Dict, L...
"""Verifier for Test2/t2 color-shift-by-leftmost-object rule.""" from __future__ import annotations from typing import List, Sequence, Tuple Grid = List[List[int]] Cell = Tuple[int, int] def _neighbors8(r: int, c: int) -> list[Cell]: out: list[Cell] = [] for dr in (-1, 0, 1): for dc in (-1, 0, 1): ...
t3
[{"input":[[2,0,5,5,7,7],[2,2,2,3,7,4],[1,2,2,7,7,4],[1,2,3,0,7,0],[2,2,4,4,7,7],[2,2,4,4,0,0]],"output":[[4,1],[4,1],[0,2]]},{"input":[[0,0,8,0,3,0,3,0,0],[8,8,8,0,5,0,0,4,4],[0,6,8,6,5,6,4,0,5],[1,0,8,0,5,4,4,2,0],[0,1,8,3,0,5,0,0,2],[8,8,8,3,0,0,0,9,9],[0,0,3,2,2,2,2,9,0],[0,3,0,2,2,2,2,9,0],[3,3,0,2,2,2,2,9,5],[0,0...
[[5,5,0,0,0,0,0,0,0,7,7],[0,5,5,5,2,2,0,0,0,7,7],[0,0,5,5,0,2,2,0,1,7,3],[0,0,5,5,2,0,2,1,0,7,0],[0,0,0,0,0,0,1,0,0,7,7],[4,4,4,0,0,1,2,5,0,0,0],[0,0,4,0,1,0,2,0,5,0,0],[3,0,4,1,0,0,2,0,0,5,0],[0,3,4,0,0,0,2,2,2,0,5],[4,4,4,0,0,0,0,0,0,0,0]]
[[7,0,0],[3,3,0],[0,0,3]]
{"train":[{"input":[[9,5,8,9,4,5,9,0,0,0,0,0,0,0],[9,9,9,9,9,9,9,0,0,1,1,1,0,0],[0,0,0,0,0,0,0,0,0,1,1,0,0,0],[3,0,3,3,0,0,0,0,0,1,0,0,0,0],[0,3,3,3,0,0,0,0,0,0,0,0,0,0],[0,0,3,0,3,0,0,0,0,0,0,0,0,0],[0,0,3,0,0,0,0,0,0,0,0,0,0,0],[8,0,8,0,0,0,0,0,0,0,8,0,0,0],[8,8,8,0,0,0,3,3,3,0,8,8,8,8],[0,0,8,8,8,0,0,5,5,5,5,5,5,5],...
"""Generator for Test2/t3: extract wrapped rectangle interior.""" from __future__ import annotations import random from typing import List Grid = List[List[int]] def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] for _ in range(h)] def _random_content(rng: random.Random, h: int, w: int, frame_...
"""Verifier for Test2/t3 wrapped-rectangle task.""" from __future__ import annotations from typing import List Grid = List[List[int]] def verify_t3(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") h = len(inp) w = len(inp[0]) if any(len(row) != ...
t4
[{"input":[[0,0,0,0,0,0,0,2,2,2,2,2],[0,0,0,0,0,0,0,2,3,0,0,2],[0,0,0,0,0,0,0,2,0,1,0,2],[0,0,0,0,0,0,0,2,0,0,0,2],[0,0,0,0,0,0,0,2,2,2,2,2],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,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ectangle task.""" from __future__ import annotations import random from typing import List Grid = List[List[int]] RED = 2 def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] for _ in range(h)] def _neighbors4(r: int, c: int) -> list[tuple[int, int]]: retur...
"""Verifier for Test2/t4 scaled-rectangle task.""" from __future__ import annotations from typing import List Grid = List[List[int]] RED = 2 def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] for _ in range(h)] def _neighbors4(r: int, c: int) -> list[tuple[int, int]]: return [(r - 1, c), (...
t5
[{"input":[[8,8,8,0,0,0,0,0,0,0],[8,8,8,0,0,0,0,0,0,0],[8,8,8,8,0,0,0,0,0,0],[7,7,7,7,7,7,0,7,7,7],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[7,7,7,7,7,7...
[[8,8,0,0,8,8,0,0,0,0],[8,8,0,0,8,8,0,0,0,0],[8,8,0,0,0,0,0,0,0,0],[8,8,0,0,0,0,0,8,8,8],[8,8,0,0,0,0,0,8,8,8],[0,0,0,0,0,0,0,8,8,8],[7,7,7,7,0,7,7,7,7,7],[0,0,0,0,8,8,0,0,0,0],[8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8]]
[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,8,8,8,8,0,0,0],[8,8,8,8,8,8,8,8,8,8],[7,7,7,7,8,7,7,7,7,7],[8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8]]
{"train":[{"input":[[8,8,8,8,8,8,8,8,8,8,8],[8,8,8,8,8,8,8,8,8,8,8],[0,0,0,0,0,8,0,0,0,0,0],[7,7,7,7,7,0,7,7,7,7,7],[8,8,8,8,0,8,0,8,8,8,8],[8,8,8,8,8,8,8,8,8,8,8],[8,0,0,0,0,0,0,0,8,8,8],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0,0],[...
"""Generator for Test2/t5 cyan-flow task.""" from __future__ import annotations import random from typing import List Grid = List[List[int]] CYAN = 8 ORANGE = 7 def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] for _ in range(h)] def _neighbors4(r: int, c: int) -> list[tuple[int, int]]: ...
"""Verifier for Test2/t5 cyan-flow task.""" from __future__ import annotations from typing import List from generator import transform_t5 Grid = List[List[int]] def verify_t5(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) if any(l...
t6
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,5,0,0,0,6,0,0,0,0,5,0],[0,5,0,0,0,0,6,0,0,0,5,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,5,0,0,0,0,0,0,1,0,5,0],[0,5,0,0,0,0,1,1,0,0,5,0],[0,5,5,5,5,5,5,5,5,5,5,3],[0,5,0,0,0,0,0,0,0,7,5,0],[0,5,0,0,0,0,0,0,7,0,5,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,0,0,0,0,0,0,0,0,0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,5,0,0,5,0,0,5,0,0,5,0],[0,5,0,0,0,5,0,0,5,0,5,0],[0,5,0,0,5,0,0,5,0,0,5,0],[0,5,0,7,0,5,0,0,5,0,5,0],[0,5,0,0,5,0,0,5,0,4,5,0],[0,5,0,0,0,5,0,0,5,0,5,0],[0,5,0,0,5,0,1,5,0,0,5,0],[0,5,0,0,0,5,0,0,5,0,5,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,0,0,0,0,0,0,0,0,0,0,3]]
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,5,2,2,5,4,4,5,3,3,5,0],[0,5,2,2,2,5,4,4,5,3,5,0],[0,5,2,2,5,4,4,5,3,3,5,0],[0,5,2,2,2,5,4,4,5,3,5,0],[0,5,2,2,5,4,4,5,3,3,5,0],[0,5,2,2,2,5,4,4,5,3,5,0],[0,5,2,2,5,4,4,5,3,3,5,0],[0,5,2,2,2,5,4,4,5,3,5,0],[0,5,5,5,5,5,5,5,5,5,5,0],[0,0,0,0,0,0,0,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,3,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,5,5,5,5,5,5,5,5,5,0],[0,0,5,0,0,0,0,0,0,0,0,5,0],[0,0,5,0,0,0,0,0,0,0,0,5,0],[0,0,5,0,0,0,0,0,0,0,0,5,0],[0,0,5,0,0,0,0,6,0,0,0,5,0],[0,0,5,0,0,0,0,6,0,0,0,5,0],[0,0,5,0,0,0,0,0,0,0,0,5,0],[0,0,5,0,0,0,0,0,0,0,0,5,0],[0,0,5,0,0,0,0,0,0,0...
"""Generator for Test2/t6 partition-distance ranking task.""" from __future__ import annotations import random from typing import List Grid = List[List[int]] GREY = 5 GREEN = 3 RANK_COLORS = [3, 4, 2] # closest, second, third # Only green is forbidden for partition objects. OBJECT_PALETTE = [1, 2, 4, 6, 7, 8, 9] ...
"""Verifier for Test2/t6 partition-distance ranking task.""" from __future__ import annotations from typing import List from generator import transform_t6 Grid = List[List[int]] def verify_t6(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp...
t7
[{"input":[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,2,2,2,0],[0,0,0,0,0,2,2,2,0],[0,0,0,0,0,0,2,2,0],[0,7,7,0,0,0,0,0,0],[0,7,0,0,0,8,0,0,0],[0,7,0,0,0,0,0,0,0],[0,7,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,8,8,8,0],[0,0,0,0,8,2,2,2,8],[0,0,0,0,8,2,2,2,8],[0,0,0,0,0,8,2,2,8],[0,7,7,0,0,0,8,8,0],[0,7,0,0,0,8,0,0,0...
[[0,0,0,0,0,0,0,0,0,0],[0,6,6,6,0,0,0,0,9,0],[0,6,0,0,0,0,0,0,9,0],[0,6,0,0,0,0,0,9,9,0],[0,0,0,0,0,0,0,9,9,0],[0,0,0,0,8,0,0,9,9,0],[0,0,0,0,0,0,0,0,9,0],[0,3,3,3,0,0,0,9,9,0],[0,0,0,3,3,0,0,9,0,0],[0,0,0,0,0,0,0,0,0,0]]
[[0,0,0,0,0,0,0,0,0,0],[0,6,6,6,0,0,0,0,9,0],[0,6,0,0,0,0,0,0,9,0],[0,6,0,0,0,0,0,9,9,0],[0,0,0,0,0,0,0,9,9,0],[0,0,0,0,8,0,0,9,9,0],[0,8,8,8,0,0,0,0,9,0],[8,3,3,3,8,0,0,9,9,0],[0,8,8,3,3,8,0,9,0,0],[0,0,0,8,8,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,8,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,3,0],[0,0,0,0,0,0,0,0,0,3,3,0],[0,7,0,0,0,0,0,0,3,3,3,0],[0,7,7,7,0,0,0,0,0,0,0,0],[0,7,7,7,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0...
"""Generator for Test2/t7 diagonal-connect-and-wrap task.""" from __future__ import annotations import copy import random from typing import List, Optional Grid = List[List[int]] CYAN = 8 PALETTE = [1, 2, 3, 4, 5, 6, 7, 9] DIAGONALS = [(-1, -1), (-1, 1), (1, -1), (1, 1)] def _empty(h: int, w: int) -> Grid: re...
"""Verifier for Test2/t7 diagonal-connect-and-wrap task.""" from __future__ import annotations from typing import List from generator import transform_t7 Grid = List[List[int]] def verify_t7(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[...
t8
[{"input":[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[2,1,1,1,5,1,5,1,1],[1,1,1,5,1,1,5,1,2],[1,1,5,1,1,2,5,1,1],[1,5,1,2,1,1,1,5,1],[1,5,1,1,1,1,2,5,1],[1,1,5,1,2,1,5,1,1],[1,1,1,5,5,5,1,1,2]],"output":[[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,2,2,2,2]]},{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0...
[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[1,5,2,1,1,1,1,2,5,1],[2,5,1,2,1,2,1,5,1,1],[1,5,1,1,1,1,5,2,2,1],[1,1,5,1,2,1,1,5,1,1],[2,1,5,1,1,1,2,5,1,2],[1,1,5,2,1,2,5,1,1,1],[1,2,1,5,5,5,1,1,1,1],[1,1,1,1,1,1,2,1,1,2]]
[[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,2,0,2,0,0],[2,2,2,2,2,2]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[1,1,1,1,5,2,2,1,1,1,5,1],[1,1,1,5,1,1,1,1,1,1,5,1],[1,1,5,1,1,1,1,1,1,1,5,1],[1,1,5,2,1,1,1,1,1,5,1,1],[1,1,5,1,1,2,1,1,1,5,1,1],[1,5,1,1,2,2,2,1,2,5,1,1],[1,5,5,5,5,5,5,5,5,5,1,1],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1...
"""Generator for Test2/t8 enclosed-body red gravity task.""" from __future__ import annotations import copy import random from typing import List Grid = List[List[int]] BLUE = 1 RED = 2 GREY = 5 def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] for _ in range(h)] def _neighbors4(r: int, c: i...
"""Verifier for Test2/t8 enclosed-body red gravity task.""" from __future__ import annotations from typing import List from generator import transform_t8 Grid = List[List[int]] def verify_t8(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[...
t9
[{"input":[[0,0,1,0,0,0,0,4,0],[0,0,1,0,0,0,0,0,4],[1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,9,9,9,9,0,0],[0,8,0,9,0,0,0,0,0],[8,0,0,9,0,0,0,0,0],[0,0,0,9,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],"output":[[9,9,9,9],[9,4,8,1],[9,8,4,1],[9,1,1,1]]},{"input":[[0,0,4,0,0,0,3,3],[0,4,0,0,0,0,3,0],[4,0,0,0,0,0,0,0],[0,0,0,0,0,0...
[[0,0,0,0,0,8],[0,1,1,0,0,8],[0,1,0,0,0,0],[0,1,0,0,0,0],[0,0,0,0,0,0],[2,0,0,0,5,5]]
[[1,1,8],[1,2,8],[1,5,5]]
{"train":[{"input":[[6,6,6,6,6,6,0,0,0,0,0,0,0,0],[6,6,6,6,6,6,0,0,0,0,0,0,0,0],[0,6,6,6,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,4,4,0,0,0,0,0],[0,9,9,0,0,0,0,4,4,0,0,0,0,0],[9,9,9,9,0,0,0,0,4,0,0,0,0,0],[0,9,9,9,0,0,0,0,4,0,0,3,0,0],[0,0,0,0,0,0,0,0,0,0,0,3,3,0],[0,0,0,0,0,0,0,0,0,0,0,3,0,0],[0,0,0,0,0,0,0,0,0,0,0,3,3,0]]...
"""Generator for Test2/t9 unique rectangle assembly task.""" from __future__ import annotations import copy import random from dataclasses import dataclass from itertools import combinations from typing import List, Optional Grid = List[List[int]] PALETTE = [1, 2, 3, 4, 5, 6, 7, 8, 9] def _empty(h: int, w: int) -...
"""Verifier for Test2/t9 unique rectangle assembly task.""" from __future__ import annotations from typing import List from generator import transform_t9 Grid = List[List[int]] def verify_t9(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[...
t10
[{"input":[[0,1,8,6,1,0,0,0,0],[0,0,0,0,6,0,0,0,4],[0,0,0,0,0,0,0,0,4],[0,0,0,0,0,0,0,0,4],[0,0,0,0,0,0,0,0,0],[0,0,8,0,0,0,0,0,0],[0,0,0,0,0,0,2,0,0],[0,0,0,0,0,0,0,0,0],[0,0,2,0,0,0,0,0,0]],"output":[[0,1,8,6,1,0,2,0,0],[0,0,0,0,6,0,0,0,4],[0,0,2,0,0,0,0,0,4],[0,0,0,0,0,0,8,0,4],[0,0,0,0,0,0,0,0,0],[4,0,8,0,0,0,0,0,0...
[[0,0,0,0,0,4,0,0,0,9],[0,0,0,0,4,0,4,0,0,0],[0,0,0,0,0,0,0,0,5,5],[2,2,2,0,0,0,0,0,0,5],[0,0,2,0,0,1,0,0,0,5],[0,0,0,0,0,0,0,0,0,0],[0,8,8,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,3,0,0,0,0,0,0,0,6],[0,3,3,0,0,0,0,0,6,6]]
[[6,6,0,0,0,4,0,3,3,9],[6,0,0,0,4,0,4,0,3,0],[0,0,0,0,0,0,0,0,5,5],[2,2,2,0,0,0,0,8,8,5],[0,0,2,0,0,1,0,0,0,5],[5,0,0,0,1,0,0,2,0,0],[5,8,8,0,0,0,0,2,2,2],[5,5,0,0,0,0,0,0,0,0],[0,3,0,4,0,4,0,0,0,6],[9,3,3,0,4,0,0,0,6,6]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[3,3,0,0,0,0,0,0,0],[3,3,0,0,0,9,9,9,0],[3,3,3,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[6,6,6,0,0,0,4,4,4],[6,6,0,0,0,0,0,0,0],[6,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0],[0,0,0,1,1,1,0,0,0]],"output":[[0,0,0,1,1,1,0,0,0],[0,0,0,0,1,0,0,0,0],[3,3,0,0,...
"""Generator for Test2/t10: 180° partner fill (center-symmetric sparse overlay). Rule: - For each cell (r, c): output[r, c] = input[r, c] if nonzero, else input[H - 1 - r][W - 1 - c] (180° partner). Training-aligned input constraint (not required by the map algebra, but matches t10.json): - On every 180° orbit, at ...
"""Verifier for Test2/t10: 180° partner fill.""" from __future__ import annotations from typing import List from generator import transform_t10 Grid = List[List[int]] def verify_t10(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) i...
t11
[{"input":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,9,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,3,0,3,0,0,0,9,0],[0,9,0,1,0,0,0,9,0,9],[9,0,3,0,3,0,9,0,9,0],[0,9,0,0,0,9...
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,8,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]]
[[0,0,0,8,0,0,0,0,0,8,0,0],[0,0,8,0,3,0,3,0,8,0,8,0],[0,8,0,0,0,1,0,8,0,0,0,8],[8,0,0,0,3,0,3,0,0,0,8,0],[0,8,0,0,0,1,0,0,0,8,0,0],[0,0,8,0,3,0,3,0,8,0,0,0],[0,0,0,8,0,0,0,8,0,0,0,0],[3,0,3,0,8,0,8,0,0,0,3,0],[0,1,0,0,0,8,0,0,0,0,0,1],[3,0,3,0,8,0,8,0,0,0,3,0],[0,8,0,8,0,0,0,8,0,8,0,0],[0,0,8,0,0,0,0,0,8,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,2,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0...
"""Generator for Test2/t11: diagonal rays with wall bounces. Rule implemented: - Input has exactly one non-zero start cell (source color). - From start, shoot along all 4 diagonal directions. - For each direction: 1) March to the first wall (boundary cell), coloring visited cells with source color. 2) Bounce off t...
"""Verifier for Test2/t11 diagonal-bounce task.""" from __future__ import annotations from typing import List from generator import transform_t11 Grid = List[List[int]] def verify_t11(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t12
[{"input":[[0,0,0,0,0,0,0,0,0,0],[1,1,1,6,0,0,0,0,0,0],[1,0,0,0,0,0,2,0,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0,0,0,0,0,8,0],[1,0,0,0,0,0,0,0,0,0,0,8,0],[0,0,0,0,0,0,0,0,0,8,8,8,0],[9,9,9,9,9,9,9,9,9,9,9,9,9],[0,0,0,0,0,0,0,0,0,0...
"""Generator for Test2/t12: demonstration-grounded container push. Design: - Container templates are grounded in the provided t12 demonstrations/test. - We expand those templates with rotations/mirrors for directional variety. - Container opening direction is therefore unambiguous by template identity. - Support bar (...
"""Verifier for Test2/t12 container push task.""" from __future__ import annotations import json from pathlib import Path from typing import List from generator import transform_t12 Grid = List[List[int]] def _grid_key(g: Grid) -> tuple[tuple[int, ...], ...]: return tuple(tuple(int(v) for v in row) for row in...
t13
[{"input":[[0,0,0,0,0,0,0,0,0],[0,4,4,4,4,4,4,4,0],[0,4,1,1,1,1,1,4,0],[0,4,1,3,5,5,1,4,0],[0,4,1,5,2,5,1,4,0],[0,4,1,5,5,5,1,4,0],[0,4,1,1,1,1,1,4,0],[0,4,4,4,4,4,4,4,0],[0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0],[0,4,4,4,4,4,4,4,0],[0,4,1,1,1,1,1,4,0],[0,4,1,5,5,5,1,4,0],[0,4,1,5,2,5,1,4,0],[0,4,1,5,5,5,1,4,0...
[[0,0,0,0,0,0,0,0,0,0,0],[0,8,8,8,8,8,8,8,8,8,0],[0,8,6,6,6,6,6,6,6,8,0],[0,8,6,5,5,5,5,5,6,8,0],[0,8,6,5,4,4,4,5,6,8,0],[0,8,6,5,4,3,4,5,6,8,0],[0,8,6,5,4,4,4,5,6,8,0],[0,8,6,5,5,5,5,5,6,8,0],[0,8,6,6,6,6,6,6,6,8,0],[0,8,8,8,8,8,8,8,8,8,0],[0,0,0,0,0,0,0,0,0,0,0]]
[[0,0,0,0,0,0,0,0,0,0,0],[0,8,8,8,8,8,8,8,8,8,0],[0,8,6,6,6,6,6,6,6,8,0],[0,8,6,5,5,5,5,5,6,8,0],[0,8,6,5,4,4,4,5,6,8,0],[0,8,6,5,4,2,4,5,6,8,0],[0,8,6,5,4,4,4,5,6,8,9],[0,8,6,5,5,5,5,5,6,8,9],[0,8,6,6,6,6,6,6,6,8,9],[0,8,8,8,8,8,8,8,8,8,9],[0,0,0,0,0,0,0,0,0,0,9]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0],[0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0],[0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,0],[0,0,5,5,5,8,8,8,8,8,8,8,5,5,5,0],[0,0,5,5,5,8,4,4,4,4,3,8,5,5,5,0],[0,0,5,5,5,8,4,4,4,4,4,8,5,5,5,0],[0,0,5,5,5,8,4,4,4,4,4,8,5,5...
"""Generator for Test2/t13: concentric rectangular layers + green marker + score stack. Rule (matches Test2/t13.json demos): - Input is a 0-padded grid with a solid axis-aligned rectangle of non-zero cells. - Exactly one cell is green (3), marking a position inside the rectangle. - Concentric layers are onion rings wi...
"""Verifier / forward transform for Test2/t13 (concentric layers + green marker).""" from __future__ import annotations import copy from collections import Counter, defaultdict from typing import List, Tuple Grid = List[List[int]] GREEN = 3 MARK = 9 BG = 0 def _bbox_nonzero(g: Grid) -> Tuple[int, int, int, int]: ...
t14
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,3,0,0,0,0,3,0,0,0],[2,0,0,3,0,3,0,0,0,0,3,0]],"output":[[0,0,0,0,0,0,0,0,0,0,4,0],[0,0,0,0,0,0,0,0,0,4,4,4],[0,0,0,0,0,0,0,0,0,0,4,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,3,0,0,0,0,3,0,0,0],[0,0,0,3,0,3...
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,3,0,0],[0,0,0,0,0,0,0,0,0,3,0,0],[0,0,3,3,0,3,0,3,0,3,0,0],[2,0,0,0,0,3,0,3,0,0,0,0]]
[[0,0,0,0,0,0,0,0,0,0,4,0],[0,0,0,0,0,0,0,0,0,4,4,4],[0,0,0,0,0,0,0,0,0,3,4,0],[0,0,0,0,0,0,0,0,0,3,0,0],[0,0,3,3,0,3,0,3,0,3,0,0],[0,0,0,0,0,3,0,3,0,0,0,2]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,3,0,0,0,0,0,0,0,0,3,0,0],[2,3,0,0,3,0,0,0,0,0,0,0,0,3...
"""Generator for Test2/t14: bottom-runner jump/duck with conditional star.""" from __future__ import annotations import random from typing import List Grid = List[List[int]] BG = 0 DOT = 2 BLOCK = 3 STAR = 4 def _copy_grid(g: Grid) -> Grid: return [row[:] for row in g] def _grounded_height(g: Grid, c: int) ...
"""Verifier for Test2/t14 dot jump + duck + conditional star task.""" from __future__ import annotations from typing import List from generator import transform_t14 Grid = List[List[int]] def verify_t14(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") ...
t15
[{"input":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,1,0],[0,0,0,1,0,0,0,6,0,0],[0,0,0,0,1,0,1,0,0,0],[0,0,2,0,0,1,0,0,0,0],[0,0,0,0,1,0,1,0,0,0],[0,0,0,8,0,0,0,1,0,0],[0,0,1,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,2,0,0,1,0],[0,0,0,1,0,0...
[[0,0,0,0,0,0,0,0,0],[0,0,0,8,8,2,0,0,0],[0,0,8,0,4,0,8,0,0],[0,7,0,8,8,8,0,8,0],[8,0,8,0,0,0,8,0,8],[3,0,8,0,0,0,8,0,8],[8,0,8,0,0,0,7,0,8],[0,8,0,8,8,8,0,8,0],[0,0,8,0,0,0,8,0,0],[0,0,0,2,2,8,0,0,0]]
[[0,0,0,0,0,0,0,0,0],[0,0,0,8,8,2,0,0,0],[0,0,8,0,0,0,8,0,0],[0,7,0,8,8,8,0,8,0],[8,0,8,0,0,0,8,0,8],[3,0,8,0,0,0,8,4,8],[8,0,8,0,0,0,7,0,8],[0,8,0,8,8,8,0,8,0],[0,0,8,0,0,0,8,0,0],[0,0,0,2,2,8,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,5,5,0,0,0,0],[0,0,0,0,5,0,5,0,0,0,0,0],[0,0,0,0,5,5,5,5,2,0,0,0],[0,0,0,0,0,0,5,0,5,0,0,0],[0,0,0,0,0,5,5,0,0,0,0,0],[0,0,0,0,0,0,5,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0...
"""Generator for Test2/t15: move independent cell one partition clockwise.""" from __future__ import annotations import random from collections import Counter from typing import List, Sequence, Tuple Grid = List[List[int]] Pos = Tuple[int, int] def _empty(h: int, w: int) -> Grid: return [[0 for _ in range(w)] ...
"""Verifier for Test2/t15 partition-clockwise move rule.""" from __future__ import annotations from typing import List from generator import transform_t15 Grid = List[List[int]] def verify_t15(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid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5,0,0],[0,5,0,0,0,0,0,0,0,0,5,5,5,5,0,0],[0,5,0,0,0,0,0,0,5,0,5,5,5,0,0,0],[0,5,0,0,0,5,5,5,5,0,5,0,0,0,0,0],[0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,1],[0,0,0,0,0,5,0,0,0,0,5,0,0,0,1,1],[0,0,0,0,0,0,0,5,5,5,5,0,0,0...
"""Generator for Test2/t16: edge fragments assemble to a target grey shape. Orthogonally-connected task-color islands are fused transitively whenever they king-touch, so diagonal contact defines a single prototype (no special-case ridge split). Interior grey is matched on 4-connectivity only. Generator rejects layout...
"""Verifier for Test2/t16 edge-assembly recoloring.""" from __future__ import annotations from typing import List from generator import transform_t16 Grid = List[List[int]] def verify_t16(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0])...
t17
[{"input":[[0,0,0,6,6,6,0,0,6],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,6,0,0],[0,0,0,0,0,0,6,0,6],[0,0,6,0,0,0,6,6,6],[0,0,6,0,6,0,0,0,0],[0,0,6,6,6,0,0,0,0],[0,0,0,0,0,0,6,0,0],[0,0,0,0,0,0,6,0,6]],"output":[[0,0,0,0,0,0,0,0,0],[0,0,0,6,0,0,0,0,6],[0,0,0,6,0,6,0,0,6],[0,0,0,6,6,6,0,0,6],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,6,0,0...
[[4,4,4,0,4,4,0,0,0,0,4,4],[4,4,0,0,4,0,4,0,0,0,4,0],[4,0,4,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,4,4,4,0,0,0,0,0,0],[0,0,0,4,4,0,0,0,4,4,4,0],[4,4,0,4,0,4,0,0,4,4,0,0],[4,0,0,0,0,0,0,0,4,0,4,0],[0,4,0,0,0,4,4,4,0,0,0,0],[0,0,0,0,0,4,4,0,0,4,4,4],[0,4,4,4,0,4,0,4,0,4,4,0],[0,4,4,0,0,0,0,0,0,4,0,4]]
[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,4,4,4,0,0,0,4,4],[4,4,4,0,4,4,0,0,0,0,4,4],[4,4,0,0,4,0,4,0,0,0,4,0],[4,0,4,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,4,4,4,0,0,0,0,0,0],[0,0,0,4,4,0,0,0,4,4,4,0],[4,4,0,4,0,4,0,0,4,4,0,0],[4,0,0,0,0,0,0,0,4,0,4,0],[0,4,0,0,0,4,4,4,0,0,0,0]]
{"train":[{"input":[[4,0,0,0,4,4,0,0,0,0,0,0,0,0,4,4],[4,0,0,0,0,0,0,4,0,0,0,0,0,0,4,4],[0,0,4,0,0,0,0,0,4,4,0,0,0,0,0,0],[0,0,0,4,4,0,0,0,4,4,0,0,0,0,0,0],[4,0,0,4,4,0,0,0,0,0,0,0,0,0,4,0],[4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,4,0,0,0,0,0...
"""Generator for Test2/t17 (pattern fall). The prototype is always **fully visible** somewhere on the grid (an unclipped copy), with at least one placement **strictly inside** the outer border (not on row/column 0 or the last row/column). **Inference.** Prefer strictly interior 4‑connected foreground blobs of size 2–...
"""Verifier for Test2/t17 recurring-pattern downward shift.""" from __future__ import annotations from typing import List from generator import transform_t17 Grid = List[List[int]] def verify_t17(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len...
t18
[{"input":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,8,0,0,0,8,0],[0,0,0,8,0,8,0,8,0,8],[0,0,8,0,0,0,8,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,8,0,0,0,8,0],[0,0,0,8,0,8...
[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,9,0,0,0,9,0],[0,0,9,0,0,0,9,0,0,0],[0,0,9,9,9,9,9,9,9,9],[0,0,9,0,0,0,9,0,0,0],[0,0,0,0,9,0,0,0,9,0]]
[[0,0,0,9,0,0,0,9,0,0],[0,9,0,0,0,9,0,0,0,9],[9,9,9,9,9,9,9,9,9,9],[0,9,0,0,0,9,0,0,0,9],[0,0,0,9,0,0,0,9,0,0],[0,0,0,0,9,0,0,0,9,0],[0,0,9,0,0,0,9,0,0,0],[0,0,9,9,9,9,9,9,9,9],[0,0,9,0,0,0,9,0,0,0],[0,0,0,0,9,0,0,0,9,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0,1,0,0,0,0],[0,0,1,0,0,0,0,0,1,0,0,0,0],[0,1,1,1,1,1,1,1,1,1,1,1,1],[0,0,0,0,0,1,0,0,0,0,0,1,0],[0,0,0,0,0,1,0,0,0,0...
"""Generator for Test2/t18: horizontal periodic pattern wrapping between halves. Rule: a horizontally periodic motif occupies one half of the grid, with its axis row reaching one of the side edges (left or right) and NOT touching the opposite edge. The motif then "wraps" into the other half on the SAME side as the wra...
"""Verifier for Test2/t18 horizontal wrap-and-continue rule.""" from __future__ import annotations from typing import List from generator import transform_t18 Grid = List[List[int]] def verify_t18(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = le...
t19
[{"input":[[5,0,0,0,0,8,0,0,0,0],[0,0,0,0,0,8,0,0,0,0],[0,0,0,0,0,8,0,0,0,0],[0,0,0,0,0,8,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,3,3,3,0,0,0,0,0,0],[0,3,0,0,0,0,0,0,0,0],[0,3,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,5]],"output":[[5,0,0,0,0,8,8,8,8,0],[0,0,0,0,0,8,8,8,8,0],[0,0,0,0,0,8,8,8,8,0],[0,0,0,0,0,8...
[[0,0,0,0,0,0,2,2,2,2,2],[0,0,0,0,0,0,0,0,0,0,2],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[5,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,3,3,3,0,0,0],[0,0,0,0,0,3,0,0,0,0,0],[4,0,0,0,0,3,0,0,0,0,0],[4,0,0,0,0,0,0,0,0,0,0],[4,4,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,5,0,0,0,0]]
[[0,0,0,0,0,5,5,5,5,5,5],[0,0,0,0,0,5,5,5,5,5,5],[0,0,0,0,0,5,5,5,5,5,5],[0,0,0,0,0,5,5,5,5,5,5],[5,0,0,0,0,5,5,5,5,5,5],[0,0,0,0,0,5,5,5,5,5,5],[0,0,0,0,0,5,5,5,5,5,5],[4,4,4,0,0,5,5,5,5,5,5],[4,4,4,0,0,0,0,0,0,0,0],[4,4,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,5,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,8,0],[0,0,0,0,0,0,0,0,8,0,0],[0,0,0,0,0,0,3,0,0,8,0],[0,0,0,0,0,0,3,0,0,0,5],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,7,7,0],[0,0,0,5,0,0,0,0,7,0,0]],"output":[[...
"""Generator for Test2/t19: split-by-dots line and side-wise box growth/fill. Rule: - Exactly two gray dots (color 5) lie on two different grid edges. - The (invisible) line through these dots splits the grid into two halves. - Each half is processed independently: * If the half contains multiple shapes (8-connected...
"""Verifier for Test2/t19 split-by-dots line rule.""" from __future__ import annotations from typing import List from generator import transform_t19 Grid = List[List[int]] def verify_t19(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t20
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,2,2,0,2,2,0,2,2,0,2,2],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,2,2,0,2,2,2,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[2,2,2,2,0,0,0,0,2,2,2,2],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,6,6,0,0,0,0],[0,0,0,6,0,0,0,0,0,0,6,0],[0,0,0,0,0,0,6,0,0,0,0,0],[0,0,0,0,0,0,5,0,0,0,0,0],[0,0,0,0,0,5,5,5,0,0,0,...
[[0,0,0,0,0,8,8,8,8,8,8],[8,8,0,8,8,8,8,0,0,8,8],[0,0,0,0,0,0,0,0,0,0,0],[0,8,8,8,0,8,8,8,8,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,8,8,8,0,8,8,0,8,8,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,6,0,0,6,6,0,0,6,0],[0,0,0,0,0,0,6,0,0,6,0],[0,0,0,0,0,0,5,0,0,0,0],[0,0,0,0,0,5,5,5,0,0,0]]
[[0,0,0,0,0,8,8,8,8,8,8],[8,8,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,8,8,8,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,5,0,0,0,0],[0,0,0,0,0,5,5,5,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,7,7,7,0,0,0,0,0,0,7,7],[0,7,7,7,7,7,7,7,7,7,7,7],[0,0,7,7,7,7,7,7,7,0,7,7],[7,7,0,7,7,7,7,7,7,7,7,0],[0,0,0,0,0,0,0,0,0,0,6,0],[0,6,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,6,0,0,0,0,0,0],[0,0,0,0,0,0,0,6,0,0,0,0],[0,0,0,5,0,0,0,0,0,0,0,0],[0,0,5,5,5,0,0,0,0,0,0,0]],"output":[[0,...
"""Generator for Test2/t20: space-invader style ship destruction. Rule: - Alien ships are foreground components (non-zero, non-gray, non-pink). - Pink cells (6) are shots fired vertically upward. - Shots are processed by shooter row from top to bottom. - Within the same row, shot order is chosen to maximize total ship...
"""Verifier for Test2/t20 space-invader shooting rule.""" from __future__ import annotations from typing import List from generator import transform_t20 Grid = List[List[int]] def verify_t20(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[...
t21
[{"input":[[5,5,4,0,2,0,7,0,8,0],[0,0,4,0,0,0,0,8,0,0],[0,4,0,0,6,0,0,0,8,0],[0,0,0,0,6,6,0,0,0,0],[0,8,8,0,0,0,0,9,0,6],[8,0,0,0,9,5,0,0,0,0],[0,0,2,0,0,0,0,0,3,0],[0,2,0,0,0,0,0,9,0,9],[0,0,1,2,0,0,0,0,9,0],[0,1,0,0,0,0,0,0,0,0]],"output":[[0,0,3,0,0,0,2,0],[0,9,0,9,0,2,0,0],[0,0,9,0,0,0,1,2],[0,0,0,0,0,1,0,0],[7,0,8...
[[7,7,7,0,8,8,0,0,1,6,7,7],[0,7,0,0,0,8,8,0,1,6,0,0],[7,1,1,1,0,0,8,0,6,6,6,0],[0,3,3,0,0,0,8,0,0,0,0,0],[0,0,0,0,9,0,0,0,0,2,0,0],[0,0,0,9,9,9,9,0,2,0,2,0],[8,8,8,8,8,8,0,2,0,0,0,2],[0,0,0,0,0,6,0,0,0,0,0,0],[4,5,5,0,0,6,6,0,9,0,8,8],[4,0,0,9,0,0,6,0,0,8,8,0],[4,4,4,9,0,0,6,3,0,8,4,4],[0,0,0,9,0,3,3,3,0,8,0,4]]
[[9,0,8,8,4,5,5,0],[0,8,8,0,4,0,0,9],[0,8,4,4,4,4,4,9],[0,8,0,4,0,0,0,9],[1,6,7,7,7,7,7,0],[1,6,0,0,0,7,0,0],[6,6,6,0,7,1,1,1],[0,0,0,0,0,3,3,0]]
{"train":[{"input":[[8,0,0,0,0,6,0,0,0,0,4,0,0],[2,8,0,0,0,6,6,1,1,0,0,4,6],[2,2,0,0,0,6,0,1,1,0,4,4,6],[0,0,0,0,0,6,0,0,0,0,0,0,0],[0,7,7,0,0,0,0,0,0,0,0,0,0],[0,0,7,0,7,0,0,0,0,0,0,0,0],[0,0,7,7,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,2,0,0,0],[0,0,0,0,0,0,0,2,0,2,0,0,0],[0,0,0,0,0,0,0,2,2,0,0,0,0],[0,4,0,0,0,0,0,0,0,0...
"""Generator for Test2/t21: extract corner blocks and swap diagonally. Rule: - Determine corner size k from input as the bbox side length of the largest corner-assigned 8-connected non-background component. - Extract the four kxk corner patches from input. - Rearrange diagonally: TL <- BR, TR <- BL, BL <- TR, BR...
"""Verifier for Test2/t21 corner extraction and diagonal swap.""" from __future__ import annotations from typing import List from generator import transform_t21 Grid = List[List[int]] def verify_t21(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = ...
t22
[{"input":[[0,0,6,0,0,0,0,0,5,0,0],[0,0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0...
"""Generator for Test2/t22: center anchor connects to same-color cells. Rule: - For each non-background color, choose its most central cell (nearest to grid center by squared Euclidean distance) as anchor. - Process colors in order of anchor row, top to bottom. - For each target cell of that color, draw an L path fr...
"""Verifier for Test2/t22 center-connect rule.""" from __future__ import annotations from typing import List from generator import transform_t22 Grid = List[List[int]] def verify_t22(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t23
[{"input":[[1,1,1,0,0,3,3,3,3,0],[1,0,0,0,3,3,0,0,3,3],[1,2,0,3,0,0,0,0,0,3],[1,2,0,3,0,0,4,0,0,0],[0,2,0,3,0,4,4,0,0,0],[0,2,0,3,0,4,0,0,2,0],[4,0,0,0,0,4,0,2,0,0],[4,0,0,0,0,0,2,2,0,0],[4,4,4,0,0,2,2,0,0,0],[0,0,0,3,3,3,3,0,0,1]],"output":[[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0...
[[0,0,6,6,6,6,6,0,0,0],[2,2,2,0,0,0,0,8,8,8],[2,0,0,9,3,3,3,0,0,6],[2,0,0,0,9,0,7,0,0,6],[0,0,0,0,0,9,0,7,0,6],[8,8,0,0,0,0,0,0,7,6],[6,6,6,0,9,7,3,0,0,7],[0,8,0,9,0,7,3,0,0,0],[0,8,9,0,0,7,3,2,2,2],[0,9,0,0,0,7,8,8,0,0]]
[[0,0,0,0,0,0,0,0,0,0],[0,0,5,0,0,0,0,0,0,0],[0,0,5,0,0,0,0,5,0,0],[0,0,5,0,0,0,5,5,0,0],[0,0,5,0,5,0,5,5,0,0],[0,0,5,0,5,0,5,5,0,0],[0,5,0,0,0,0,5,5,5,0],[0,0,0,0,0,0,0,5,0,0],[0,0,0,0,0,0,0,5,0,0],[0,0,0,0,0,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,4,0,0,0,3,3],[9,9,9,0,0,4,0,0,0,0,0],[0,9,9,0,0,0,0,0,0,8,8],[0,0,9,0,0,0,0,1,0,0,8],[0,0,0,0,0,0,0,1,0,0,0],[0,0,0,1,0,0,0,1,0,3,0],[0,0,0,1,0,0,0,0,0,3,0],[0,0,0,9,0,0,0,0,0,3,8],[7,0,9,9,9,9,0,0,0,8,8],[7,0,9,0,0,0,0,0,0,0,8],[7,0,0,0,0,0,0,0,0,0,0]],"output":[[0,0,0,0,0,0,0,0,0,0,0],[...
"""Generator for Test2/t23: connect same-color shapes with gray straight lines. Interpretation used here: - Shapes are 8-connected components of equal color (diagonal touch connects). - For each color, every pair of its shapes connects at most once. - A connection is valid only when the endpoint neighborhood orientati...
"""Verifier for Test2/t23 same-color shape connection rule.""" from __future__ import annotations from typing import List from generator import transform_t23 Grid = List[List[int]] def verify_t23(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len...
t24
[{"input":[[0,0,0,0,0,0,0,0,9,9],[0,0,3,3,3,3,0,0,9,4],[0,0,3,0,0,3,3,0,0,4],[0,0,3,0,2,0,0,0,0,4],[0,0,3,0,0,7,7,0,0,0],[0,0,0,0,7,7,0,0,5,0],[0,0,7,7,7,0,0,5,5,0],[0,0,7,0,0,5,5,5,0,0],[8,0,0,0,0,0,0,0,0,0],[8,0,0,9,9,0,0,0,9,9]],"output":[[0,0,0,0,0,0,0,0,9,9],[0,0,2,2,2,2,0,0,9,4],[0,0,2,0,0,2,2,0,0,4],[0,0,2,0,0,0...
[[0,0,0,4,0,0,0,0,0,0],[8,8,8,4,0,0,0,0,8,0],[8,0,0,4,0,0,0,0,8,0],[8,1,0,0,0,0,0,8,8,0],[0,1,1,0,0,2,0,8,0,0],[0,0,1,4,0,0,0,0,0,0],[3,3,3,0,4,0,0,0,6,6],[0,0,0,0,0,4,0,6,6,0],[0,0,6,6,6,0,4,6,0,0],[0,0,6,0,0,0,0,6,0,0]]
[[0,0,0,4,0,0,0,0,0,0],[8,8,8,4,0,0,0,0,2,0],[8,0,0,4,0,0,0,0,2,0],[8,1,0,0,0,0,0,2,2,0],[0,1,1,0,0,0,0,2,0,0],[0,0,1,4,0,0,0,0,0,0],[3,3,3,0,4,0,0,0,6,6],[0,0,0,0,0,4,0,6,6,0],[0,0,6,6,6,0,4,6,0,0],[0,0,6,0,0,0,0,6,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,9,9],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,6,6,0,0],[0,0,0,0,0,0,0,0,0,6,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,9,0],[0,0,0,0,0,6,6,0,0,0,9,9,0],[0,0,0,0,0,6,6,6,0,0...
"""Generator for Test2/t24: virus jump-spread recoloring. Rule: - Exactly one red virus cell (color 2) is present; no other red cells exist. - Other cells form colored shapes (4-connected components of same color). - Virus spreads from infected cells to shapes by either: * direct orthogonal adjacency, * orthogonal...
"""Verifier for Test2/t24 virus jump spread rule.""" from __future__ import annotations from typing import List from generator import transform_t24 Grid = List[List[int]] def verify_t24(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t25
[{"input":[[0,9,0,9,9,0,0,0,0,0],[9,9,0,0,9,0,9,9,0,0],[0,0,9,9,0,0,9,9,0,0],[0,9,9,0,9,9,0,9,9,9],[9,9,0,0,9,9,9,0,0,9],[0,0,9,9,0,9,0,0,0,0],[9,9,0,9,0,0,0,0,9,0],[9,0,0,0,9,0,0,9,9,0],[0,0,9,0,9,9,0,0,0,9],[0,9,9,0,0,0,9,0,9,9]],"output":[[0,9,0,9,9,0,0,0,0,0],[9,9,0,0,9,0,0,0,0,0],[0,0,9,9,0,0,0,0,0,0],[0,9,9,0,9,9...
[[0,3,0,3,3,3,0,0,0,0,0],[0,3,0,0,0,3,0,3,3,3,0],[3,3,3,3,0,0,0,3,3,0,0],[0,0,0,3,3,3,0,3,3,0,0],[3,3,3,3,0,0,3,3,3,0,0],[0,3,0,0,0,0,0,0,0,0,0],[0,3,0,0,3,3,3,0,3,0,0],[0,0,0,0,0,3,0,0,3,3,3],[0,3,3,3,0,0,3,3,3,0,0],[0,0,3,0,0,0,0,3,0,0,0],[0,0,3,0,0,0,0,3,0,0,0]]
[[0,3,0,0,0,0,0,0,0,0,0],[0,3,0,0,0,0,0,3,3,3,0],[3,3,3,3,0,0,0,3,3,0,0],[0,0,0,3,3,3,0,3,3,0,0],[3,3,3,3,0,0,3,3,3,0,0],[0,3,0,0,0,0,0,0,0,0,0],[0,3,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,3,3,3,0,0,0,0,0,0,0],[0,0,3,0,0,0,0,0,0,0,0],[0,0,3,0,0,0,0,0,0,0,0]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,3,0,0,0,0,0,0],[0,0,0,0,0,0,0,3,3,0,0,0,0,0],[0,0,0,0,0,0,0,3,3,3,3,3,0,0],[0,0,0,0,0,0,0,0,3,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,3,3,3,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,3,0,0,0,0,0],[0,0,0,0,0,0,0,0,3,0,0,0,0,0],[0,0,0,0,3,3,3,0,3,0,3,3,3,0],...
"""Generator for Test2/t25: keep prototype-composable shapes, delete others. Interpretation: - Grid contains one foreground color split into multiple 4-connected shapes. - Prototype candidates are present shapes that: (a) cannot be composed from multiple non-overlapping copies of any other present shape (under...
"""Verifier for Test2/t25 prototype composition filter rule.""" from __future__ import annotations from typing import List from generator import transform_t25 Grid = List[List[int]] def verify_t25(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("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0,5,0,0,0,0,0,0,0,0,0,0,0,5,0,0],[0,0,3,0,0,0,8,0,8,0,0,0,0,0,3,0,0],[0,0,9,0,0,0,0,8,8,0,0,0,0,0,9,0,0],[0,0,0,0,0,0...
"""Generator for Test2/t26: fill symmetry-supported gaps in a colored outline. Rule: - The input shows a colored hollow outline plus one or two central cyan lines. - Each cyan line is a line of symmetry (vertical, horizontal, main diagonal, or anti-diagonal). - In the output, any gap position is filled if some other...
"""Verifier for Test2/t26 symmetry-gap-fill task.""" from __future__ import annotations from typing import List from generator import transform_t26 Grid = List[List[int]] def verify_t26(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('input grid must be non-empty') w = len(inp[0]) ...
t27
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0],[0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,0,0,0,0,3,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0],[0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0],[0,0,0,0,0,0,0,0,5,5,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0],[0,0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,8,2,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,8,8,2,0,0],[0,0,0,0,0,0,0,2,5,5,7,7,0,0,0,0,0,0,3,7,5,2,2,0,0],[0,0,0,0,0,0,0,2,2,5,7,3,0,0,0,0,0,0,7,7,5,5,2,0,0],[0,0,0,...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,5,0,0,0,0,2,2,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0],[0,0,5,5,0,0,0,0,2,2,0,0,0,0,0,0,7,7,7,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
"""Diverse generator for t27_square_anchors. Generated inputs contain several colored anchor shapes. The shapes can be partitioned into one or two square arrangements. Within each arrangement, the member shapes tile a filled 3x3, 4x4, or 5x5 square when rotations are allowed (up to five pieces on a 5x5). For each memb...
"""Verifier for t27: square completion around each anchor shape. Valid inputs contain several monochrome objects, identified by color. The objects can be partitioned into one or two groups. Within each group (at most five shapes), those shapes can be rotated and packed to form one filled k x k square. For every mem...
t28
[{"input":[[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,3,0,0],[0,0,0,0,0,0,0,3,3,3,0],[0,0,0,0,0,0,0,3,3,3,0],[0,0,0,3,0,0,0,0,0,0,0],[0,0,3,3,3,0,0,0,0,0,0],[0,3,3,3,3,3,0,0,0,0,0],[0,3,3,3,3,3,0,0,0,0,0],[0,0,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: breakout-style diagonal bouncing stop. Task rule: - The input contains several obstacle cells/shapes, a single colored moving cell near the bottom, and a 2-cell grey diagonal pointer extending from that cell. - The pointer indicates the moving cell's initial diagonal direction. - Imagine the ce...
"""Verifier for t28 breakout-style bounce-stop task.""" from __future__ import annotations from typing import List from generator import transform_t28 Grid = List[List[int]] def verify_t28(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('Input grid must be non-empty') w = len(inp[0]...
t29
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,3,3,0,0,0,0,6,6,0,0,0,0],[0,0,0,0,3,0,0,0,0,0,0,6,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,6,4,0,0,0,0,0,0,0],[0,0,0,0,6,6,4,4,0,0,0,0,0,0],[0,0,0,0,8,8,3,3,0,0,0,0,0,0],[0,0,0,0,0,8,3,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,6,0,0],[0,0,0,0,0,0,0,0,0,0,6,6,0,0],[3,3,0,0,0,0,0,0,0,0,0,0,0,0],[3,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,6,6,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0],[0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0...
"""Generator for t29: color-directed diagonal motion of V/L-shaped objects. Rule: - Each connected monochrome object moves rigidly in a direction determined only by its color: 6 (magenta): up-right (-1, +1) 3 (green): up-left (-1, -1) 4 (yellow): down-left (+1, -1) 8 (cyan): down-right...
"""Verifier for t29: color-directed diagonal motion of objects.""" from __future__ import annotations from typing import List from generator import transform_t29 Grid = List[List[int]] def verify_t29(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('Input grid must be non-empty') w =...
t30
[{"input":[[0,0,0,0,0],[0,0,0,0,0],[0,0,4,0,0],[0,0,0,0,0],[0,0,0,0,0],[6,6,6,6,6],[0,0,0,0,0],[0,0,4,0,0],[0,4,0,4,0],[0,0,4,0,0],[0,0,0,0,0],[6,6,6,6,6],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[6,6,6,6,6],[0,4,0,4,0],[4,0,0,0,4],[0,0,0,0,0],[4,0,0,0,4],[0,4,0,4,0]],"output":[[0,0,0,0,0],[0,0,0,0,0...
[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,8,0,0,0,8,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,8,0,0,0,8,0],[8,0,0,0,0,0,8]]
[[0,0,0,8,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,8,0,0,0,8,0],[0,0,0,0,0,0,0],[6,6,6,6,6,6,6],[0,0,0,8,0,0,0],[0,0,8,0,8,0,0],[0,8,0,0,0,8,0],[8,0,0,0,0,0,8]]
{"train":[{"input":[[0,0,0,0,0,9,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[6,6,6,6,6,6,6,6,6,6,6],[0,0,0,0,0,9,0,0,0,0,0],[0,0,0,0,9,0,9,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0...
"""Generator for t30_missing_progression_frames. Creates vertical frame sequences with blank missing frames. The output fills those frames by continuing a simple visual progression. """ from __future__ import annotations import random from typing import Dict, Iterable, List, Sequence, Set, Tuple from verifier impor...
"""Verifier for t30: fill missing frames in a simple progression. The grid is a vertical strip of equal-size frames separated by a full row of 6s. Blank frames are missing. Supported progression families are deliberately simple and natural: expanding diamond rings, growing V outlines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,0,0,6,6,0,0,0,0],[0,0,0,0,0,0,0,0,3,0,0,6,6,0,0,0,0],[9,9,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0],[9,9,0,0,0,0...
"""Generator for t31: mirror 2x2 blocks across a green divider unless blocked. Rule: - The grid is split into equal left/right halves by a full-height green vertical line. - Each non-green object is a solid 2x2 block. - Each block has a corresponding 2x2 target position on the opposite half at the same row and sam...
"""Verifier for t31 mirror-block transfer task.""" from __future__ import annotations from typing import List from generator import transform_t31 Grid = List[List[int]] def verify_t31(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('input grid must be non-empty') w = len(inp[0]) ...
t32
[{"input":[[3,3,3,0,8,8,8],[3,3,3,0,8,8,8],[2,2,2,0,4,4,4],[2,2,2,0,4,4,4],[1,1,1,0,3,3,3],[1,1,1,0,3,3,3],[7,7,7,0,9,9,9],[7,7,7,0,9,9,9],[5,5,5,5,5,5,5],[2,2,2,0,0,0,0],[1,1,1,0,0,0,0],[1,1,1,0,0,0,0],[1,1,1,0,0,0,0],[3,3,3,0,0,0,0],[7,7,7,0,0,0,0],[7,7,7,0,0,0,0],[2,2,2,0,0,0,0],[2,2,2,0,0,0,0],[7,7,7,0,0,0,0],[3,3,...
[[3,3,0,2,2],[6,6,0,8,8],[1,1,0,9,9],[4,4,0,3,3],[9,9,0,1,1],[2,2,0,6,6],[7,7,0,7,7],[8,8,0,4,4],[5,5,5,5,5],[0,0,0,8,8],[3,3,0,0,0],[0,0,0,7,7],[0,0,0,7,7],[0,0,0,6,6],[0,0,0,6,6],[0,0,0,8,8],[9,9,0,0,0],[9,9,0,0,0],[1,1,0,0,0],[0,0,0,2,2],[4,4,0,0,0]]
[[3,3,0,2,2],[6,6,0,8,8],[1,1,0,9,9],[4,4,0,3,3],[9,9,0,1,1],[2,2,0,6,6],[7,7,0,7,7],[8,8,0,4,4],[5,5,5,5,5],[6,6,0,8,8],[3,3,0,2,2],[7,7,0,7,7],[7,7,0,7,7],[2,2,0,6,6],[2,2,0,6,6],[6,6,0,8,8],[9,9,0,1,1],[9,9,0,1,1],[1,1,0,9,9],[3,3,0,2,2],[4,4,0,3,3]]
{"train":[{"input":[[1,1,1,0,7,7,7],[3,3,3,0,6,6,6],[6,6,6,0,2,2,2],[4,4,4,0,8,8,8],[7,7,7,0,9,9,9],[2,2,2,0,4,4,4],[8,8,8,0,1,1,1],[5,5,5,5,5,5,5],[3,3,3,0,0,0,0],[3,3,3,0,0,0,0],[3,3,3,0,0,0,0],[4,4,4,0,0,0,0],[4,4,4,0,0,0,0],[0,0,0,0,0,0,0],[0,0,0,0,4,4,4],[0,0,0,0,4,4,4],[7,7,7,0,0,0,0],[7,7,7,0,0,0,0],[7,7,7,0,0,0...
"""Generator for t32: bidirectional color mapping across a horizontal separator. Rule: - The grid is divided into a top and bottom section by a full grey row. - Above the grey row, each row encodes a color correspondence: the uniform color on the left half maps to the uniform color on the right half. The mapping is ...
"""Verifier for t32: bidirectional color mapping across a horizontal separator.""" from __future__ import annotations from typing import List from generator import transform_t32 Grid = List[List[int]] def verify_t32(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('Input grid must be non...
t33
[{"input":[[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,3,3,3,0,7,7,0,0],[0,0,0,3,0,0,0,7,7,0,0],[0,0,3,3,0,0,0,7,0,0,0],[0,0,0,3,0,0,0,7,0,0,0],[0,0,0,0,0,0,0,7,0,0,0],[0,0,0,0,0,0,0,0,0,0,0],[8,8,8,0,0,0,6,0,5,5,5],[8,0,0,0,6,6,6,0,0,5,0],[8,8,8,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,1,0,1,0,0],[0,0,0,0,1,1,1,1,1,0,0]],"output":[[8,8,8],[8...
[[0,0,0,0,0,0,0,0,0,0],[0,0,4,4,4,0,0,5,5,0],[0,0,0,0,4,0,0,5,5,0],[0,0,0,0,0,0,0,0,5,0],[0,0,0,0,0,0,0,0,0,0],[0,7,7,0,0,0,0,0,0,0],[0,7,0,0,0,0,1,1,0,0],[0,7,0,0,0,1,1,1,0,0],[0,7,7,7,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0]]
[[5,5],[5,5],[0,5]]
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,2,0,0,0,0,0,0],[0,0,0,0,0,0,0,2,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,9,0,0,4,4,4,0,0,0,0,0,0],[9,9,9,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,3,3,3,3,3,0,0,0,0],[0,0,0,0,0,3,3,3,3,3,0,0,0,0],...
"""Generator for t33: odd one out rectangle.""" from __future__ import annotations import json import random from pathlib import Path from typing import Dict, Iterable, List, Sequence, Set, Tuple from verifier import _extract_objects, _normalize, _odd_candidates, verify_t33 Grid = List[List[int]] Cell = Tuple[int, ...
"""Verifier for t33: odd one out rectangle. The input contains several colored objects. Exactly one object is the odd one out. If that object is removed, the remaining objects can be translated (without rotation) to tile one filled rectangle. The output is the odd object alone, cropped to its bounding box and preservi...
t34
[{"input":[[9,0,0,7,0,0,3,0,0,4,0,0],[0,9,0,0,7,0,0,3,0,0,4,0],[0,0,9,0,0,7,0,0,3,0,0,4],[1,0,0,9,0,0,7,0,0,3,0,0],[0,1,0,0,9,0,0,7,0,0,3,0],[0,0,1,0,0,8,8,8,8,2,0,3],[5,0,0,1,0,8,8,8,8,8,0,0],[0,5,0,0,1,8,8,8,8,8,7,0],[0,0,5,0,0,8,8,8,8,8,0,7],[6,0,0,5,0,8,8,8,8,8,0,0],[0,6,0,0,5,0,0,1,0,0,9,0],[0,0,6,0,0,5,0,0,1,0,0,...
[[1,1,1,1,1,1,1,1,1,1,1],[1,9,9,9,9,9,9,9,9,9,1],[1,9,3,3,3,3,3,3,3,9,1],[1,9,3,6,6,6,6,6,3,9,1],[1,9,3,6,4,4,4,6,3,9,1],[1,9,3,6,4,5,4,6,3,9,1],[1,9,3,6,4,4,8,8,8,8,1],[1,9,3,6,6,6,8,8,8,8,1],[1,9,3,3,3,3,8,8,8,8,1],[1,9,9,9,9,9,8,8,8,2,1],[1,1,1,1,1,1,1,1,1,1,1]]
[[9,9,9,9],[9,3,3,3],[9,3,6,6],[9,3,6,4]]
{"train":[{"input":[[4,4,4,4,4,4,4,4,4],[4,7,7,7,7,7,7,7,4],[4,7,5,5,5,5,5,7,4],[4,7,5,6,6,6,5,7,4],[4,7,5,6,4,6,5,7,4],[4,7,5,6,4,6,5,7,4],[4,8,8,8,8,8,2,7,4],[4,8,8,8,8,8,8,7,4],[4,8,8,8,8,8,8,7,4],[4,8,8,8,8,8,8,7,4],[4,8,8,8,8,8,8,7,4],[4,8,8,8,8,8,8,7,4],[4,7,5,5,5,5,5,7,4],[4,7,7,7,7,7,7,7,4],[4,4,4,4,4,4,4,4,4]]...
"""Generator for t34: recover an occluded pattern, then rotate by the red-corner cue. Task rule: - The input contains a cyan square occluder with exactly one red cell at one corner. - The output is the pattern hidden beneath the square, rotated so that the red corner would move to the top-left of the square. * red...
"""Verifier for t34: recover the occluded patch and rotate by the red-corner cue.""" from __future__ import annotations from typing import List from generator import transform_t34 Grid = List[List[int]] def verify_t34(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('Input grid must be n...
t35
[{"input":[[0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,4],[0,0,0,0,0,8,0,0,0,4,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0],[0,0,0,0,0,8,0,0,0,0,0,8,0,0,4,0,0,8,0,0,0,0,0,8,0,0,0,0,0],[0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,4,0,0,0,8,0,0,0,0,0],[4,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0,8,0,0,0,0,0]],"output"...
[[0,0,0,0,8,0,0,0,0,8,6,0,0,0,8,0,0,0,0,8,6,6,0,0],[0,0,0,0,8,6,0,0,0,8,6,6,0,0,8,0,0,0,0,8,6,6,6,0],[0,0,0,0,8,6,6,0,0,8,6,6,6,0,8,6,0,0,0,8,6,6,6,6],[6,0,0,0,8,6,6,6,0,8,6,6,6,6,8,6,6,0,0,8,6,6,6,6]]
[[0,0,0,0,8,0,0,0,0,8,0,0,0,0,8,6,0,0,0,8,6,6,0,0],[0,0,0,0,8,0,0,0,0,8,6,0,0,0,8,6,6,0,0,8,6,6,6,0],[0,0,0,0,8,6,0,0,0,8,6,6,0,0,8,6,6,6,0,8,6,6,6,6],[6,0,0,0,8,6,6,0,0,8,6,6,6,0,8,6,6,6,6,8,6,6,6,6]]
{"train":[{"input":[[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,8,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,8,0,1,1,1,1,1,0,8,0,0,0,0,0,0,0,8,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,8,0,1,1,1,1,1,0,8,0,0,1,1,1,0,0,8,1,1,1,1,1,1,1],[0,0,0,1,0,0,0,8,0,1,1,1,1,1,0,8,0,0,1,1,1,0,0,8,1,1,1,1,1,1,1],[0,0,0,0,0,0,0,8,0,1,1,1,1,1,0,8,0,0,1,1,1,0...
"""Generator for Test2/t35: repair the order of frame sequence. Rule: - The input shows a horizontal sequence of same-sized "image" frames separated by vertical cyan lines. - In the correct order, the frames show a natural visual progression. - The output reorders the frames into that progression. Generation constr...
"""Verifier for Test2/t35 repair-frame-order task.""" from __future__ import annotations from typing import List from generator import transform_t35 Grid = List[List[int]] def verify_t35(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t36
[{"input":[[4,0,0,6,1,0,0,9,2,0,0,1,2,0,0,3,1,0,0,8,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,5,5,0,5,5,5,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,5,5,5,0,5,5,5,0,5,5,5,0,5,5,5,0],[0,5,9,5,0,5,1,5,0,5,3,5,0,5,2,5,0],[0,5,5,5,0,5...
"""Generator for Test2/t36: follow the GPS-like relative-turn instructions. Rule: - The top row contains a yellow start token, then a sequence of (location color, turn color) pairs, then a cyan end token. - The lower part of the grid is a lattice of gray 3x3 node-tiles separated by blank spacer rows/cols. Each nod...
"""Verifier for Test2/t36 follow-GPS task.""" from __future__ import annotations from typing import List from generator import transform_t36 Grid = List[List[int]] def verify_t36(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('input grid must be non-empty') w = len(inp[0]) if a...
t37
[{"input":[[0,0,0,0,0,1,0,0,8,9,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,4,0,0,0,0,0,0,0],[2,0,0,0,0,0,4,4,4,0,0,0,0,0,0],[0,0,0,0,0,4,4,4,4,4,0,0,0,0,0],[3,0,0,0,4,4,4,4,4,4,4,0,0,0,0],[3,0,0,4,4,4,4,4,4,4,4,4,0,0,0],[0,0,0,0,4,4,4,4,4,4,4,0,0,0,0],[2,0,0,0,0,4,4,4,4,4,0,0,0,0,0],[3,0,0,0,0,0,4,4,4,0,...
[[0,0,0,0,0,1,0,3,0,0,6,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[3,0,0,0,7,7,7,7,7,7,7,0,0,0],[0,0,0,0,7,0,0,0,0,0,7,0,0,0],[0,0,0,0,7,0,0,7,0,0,7,0,0,0],[2,0,0,0,7,0,0,7,0,0,7,0,0,0],[2,0,0,0,7,0,0,7,0,0,7,0,0,0],[3,0,0,0,7,0,0,7,0,0,7,0,0,0],[3,0,0,0,7,0,0,7,0,0,7,0,0,0],[0,0,0,0,7,0,0,7,0,0,7,0,0,0],[0,0,0,0,7,0,0,7,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,7,1,7,3,7,7,6,0,0,0,0],[0,0,0,0,7,0,0,0,0,0,7,0,0,0],[0,0,0,0,7,0,0,7,0,0,7,0,0,0],[0,0,0,0,0,7,0,0,3,0,0,6,0,0],[0,0,0,0,0,7,0,0,3,0,0,6,0,0],[0,0,0,7,0,0,3,0,0,6,0,0,0,0],[0,0,0,7,0,0,3,0,0,6,0,0,0,0],[0,0,0,0,7,0,0,7,0,0,7,0,0,0],[0,0,0,0,7,0,0,7,0,...
{"train":[{"input":[[0,0,0,0,0,0,9,0,0,0,0,5,0,6,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[3,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0],[2,0,0,0,0,7,7,7,7,7,7,7,7,7,0,0,0],[0,0,0,0,0,7,7,7,7,7,7,7,7,7,0,0,0],[0,0,0,0,0,7...
"""Generator for Test2/t37: row-wise shift with top-row recoloring markers. Rule: - The input contains a large single-color shape away from the top row and left column. - Cells in the left column mark row shifts: * red (2) means shift that row's shape cells right by 1, * green (3) means shift that row's shap...
"""Verifier for Test2/t37 row-shift highlight task.""" from __future__ import annotations from typing import List from generator import transform_t37 Grid = List[List[int]] def verify_t37(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError('input grid must be non-empty') w = len(inp[0])...
t38
[{"input":[[2,0,0,0,0,0,0,0],[2,2,0,0,0,0,0,0],[8,0,2,0,0,0,0,0],[2,2,2,2,0,0,0,0],[2,0,0,0,2,0,0,0],[2,2,0,0,2,2,0,0],[2,0,8,0,2,0,2,0],[2,2,2,2,2,2,8,2]],"output":[[8,0],[8,2]]},{"input":[[3,3,0,3,3,0,0,0,0],[3,0,4,3,0,3,0,0,0],[3,3,3,3,3,3,0,0,0],[3,3,0,0,0,0,3,3,0],[3,0,3,0,0,0,4,0,3],[3,4,3,0,0,0,3,3,3],[3,3,0,3,3...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,6,6,9,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,6,0,0,6,0,0,6,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0],[0,0,0,0,6,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,6,0,0,0,0],[0,0,0,6,6,6,0,0,0,0,0,0,6,9,6,0,0,0,0,...
[[0,6,0],[6,9,9]]
{"train":[{"input":[[9,0,0,0,0,0,0,0,0],[9,5,9,0,0,0,0,0,0],[0,0,9,0,0,0,0,0,0],[5,0,0,9,0,0,9,0,0],[9,9,9,9,9,9,9,9,9],[0,0,9,0,0,9,0,0,9],[0,0,0,0,0,0,9,0,0],[0,0,0,0,0,0,9,5,5],[0,0,0,0,0,0,0,0,9]],"output":[[5,0,0],[9,5,5],[0,0,9]]},{"input":[[3,0,0,0],[3,3,0,0],[3,0,9,0],[3,3,3,3]],"output":[[9,0],[3,3]]},{"input"...
"""Generator for Test2/t38: recover the atomic template from an inverse fractal. Rule: - The input is a self-similar fractal built from a small atomic template. - The atomic template is a binary shape of size HxW. - Starting from a single filled cell, each recursion replaces every filled cell by a copy of the whole ...
"""Verifier for Test2/t38 inverse fractal template extraction.""" from __future__ import annotations from typing import List from generator import transform_t38 Grid = List[List[int]] def verify_t38(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = ...
t39
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0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,0,2,0,2,0,0,6,0,2,0,0,2,0,2,0,0,2,0,6,0,0],[0,0,6,2,6,0,0,6,2,6,0,0,6,6,6,0,0,6,2,6,0,0,6,2,6,0,0],[0,0,0,0,0,0,0,0,0,0...
"""Generator for Test2/t39: shortest directed path across cannon-islands. Rule: - The input contains several 3x3 hollow square "islands" laid out on a grid. - The island borders use one outline color. - A red cell (color 2) at the midpoint of one side of an island is a one-way cannon, allowing movement from that isl...
"""Verifier for Test2/t39 directed island shortest path.""" from __future__ import annotations from typing import List from generator import transform_t39 Grid = List[List[int]] def verify_t39(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(in...
t40
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,7,7,7,7,7,7,0],[0,1,1,1,1,0,7,0,0,0,0,7,0],[0,1,0,0,1,0,7,7,7,7,7,7,0],[0,1,1,1,1,0,0,3,3,3,0,0,0],[0,0,4,4,4,4,4,3,2,3,0,0,0],[0,0,4,0,0,0,4,3,2,3,0,0,0],[0,0,4,4,4,4,4,3,3,3,0,0,0],[0,0,0,0,8,8,8,8,8,0,0,0,0],[0,0,0,0,8,0,0,0,8,0,0,0,0],[0,0,0,0,8,0,0,0,8,0,0,0,0],[...
[[0,0,0,9,9,9,9,7,7,7,7,0,0,0,0],[0,0,0,9,0,0,9,7,2,2,7,0,0,0,0],[0,0,0,9,9,9,9,7,7,7,7,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,1,0,0,0,1,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,0,0,0,0],[0,4,4,4,4,4,4,4,4,5,5,5,5,0,0],[0,4,0,0,0,0,0,0,4,5,0,0,5,0,0],[0,4,0,0,0,0,0,0,4,5,0,0,5,0,0],[0,4,4,4,4,4,4,4,4,5,0,0,5,0,0]...
[[0,0,0,9,9,9,9,0,0,0,0,0,0,0,0],[0,0,0,9,0,0,9,0,0,0,0,0,0,0,0],[0,0,0,9,9,9,9,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,1,0,0,0,1,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,0,0,0,0],[0,4,4,4,4,4,4,4,4,0,0,0,0,0,0],[0,4,0,0,0,0,0,0,4,0,0,0,0,0,0],[0,4,0,0,0,0,0,0,4,0,0,0,0,0,0],[0,4,4,4,4,4,4,4,4,0,0,0,0,0,0]...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,1,0,1,0,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,4,4,4,0,0,0,0,0,0],[0,0,0,0,0,0,4,2,4,0,0,0,0,0,0],[0,0,0,0,0,0,4,2,4,0,0,0,0,0,0],[0,0,0,0,0,0,4,2,4,0,0,0,0,0,0],[0,0,0,0,0,0...
"""Generator for Test2/t40: remove red-marked hollow blocks and unsupported blocks. Rule: - The input contains several hollow rectangular blocks. - Some blocks are marked red by filling the entire interior of the block with red cells (color 2). - In the output, every red-marked block is removed. - Then any remaining...
"""Verifier for Test2/t40 remove unsupported hollow blocks.""" from __future__ import annotations from typing import List from generator import transform_t40 Grid = List[List[int]] def verify_t40(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len...
t41
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0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2/t41: refraction through a dotted vertical surface. Rule: - The input contains a vertical dotted gray line (color 5) and a single colored cell to its left. - The colored cell is imagined to move horizontally right, passing through the surface and ending at the far-right edge on the same row. ...
"""Verifier for Test2/t41 refraction-through-surface rule.""" from __future__ import annotations from typing import List from generator import transform_t41 Grid = List[List[int]] def verify_t41(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(...
t42
[{"input":[[3,6,6,6,7,8,8,8],[3,6,3,3,7,8,7,7],[3,3,3,6,7,8,7,8],[6,3,6,6,8,7,8,8],[7,7,7,7,4,4,4,4],[8,8,8,7,1,1,1,4],[7,7,8,8,4,4,4,1],[8,8,7,7,1,1,4,1],[4,1,4,4,3,6,3,3],[4,1,1,1,3,6,6,6],[4,4,1,4,3,3,6,3],[4,1,4,4,3,6,3,6]],"output":[[3,6,6,6,7,8,8,8],[3,6,3,3,7,8,7,7],[3,3,3,6,7,7,7,8],[6,3,6,6,8,7,8,8],[7,7,7,7,4...
[[9,9,1,1,7,7,3,7],[9,1,9,9,7,3,7,3],[9,1,9,1,7,3,7,3],[1,9,1,1,3,7,3,3],[1,9,9,9,3,7,7,7],[3,3,7,7,9,1,1,1],[7,3,7,3,1,9,1,9],[7,7,7,3,1,9,1,9],[3,7,3,7,9,1,9,1],[7,3,7,7,1,9,1,1]]
[[9,9,1,1,7,7,3,3],[9,1,9,9,7,3,7,7],[9,1,9,1,7,3,7,3],[1,9,1,1,3,7,3,3],[1,9,9,9,3,7,7,7],[3,3,7,7,9,9,1,1],[7,3,7,3,1,9,1,9],[7,7,7,3,1,1,1,9],[3,7,3,7,9,1,9,1],[7,3,7,7,1,9,1,1]]
{"train":[{"input":[[1,9,9,1,9,9,9,2,6,6,2,6,6,6],[9,1,9,9,9,1,1,6,2,6,6,6,2,2],[1,9,9,9,1,9,1,2,6,6,6,2,6,6],[6,6,2,6,2,6,6,8,8,3,8,3,8,8],[2,2,6,2,2,6,2,3,3,8,3,3,3,3],[6,2,6,6,2,2,2,8,3,8,8,8,3,3],[6,6,2,6,6,6,6,8,8,3,8,8,8,3],[6,6,6,6,2,6,2,8,8,8,8,3,8,3],[8,3,3,3,8,8,3,9,1,1,1,9,9,1],[3,8,8,8,8,8,8,1,9,9,9,9,9,1],...
"""Generator for Test2/t42: correct shifted color-scheme pattern copies across sections. Rule: - The grid is split into equal left/right halves. - It is also split into several horizontal sections. - In each section, the left half contains a two-color pattern. - The right half should contain the *same pattern* but rec...
"""Verifier for Test2/t42 shifted section-pattern correction.""" from __future__ import annotations from typing import List from generator import transform_t42 Grid = List[List[int]] def verify_t42(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = l...
t43
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,6,6,6,6,0,0,0,0,0,0],[0,0,6,6,6,6,0,0,0,0,0,0],[0,0,6,6,3,3,3,3,3,3,0,0],[0,0,6,6,3,3,3,3,3,3,0,0],[0,0,6,6,3,3,3,3,3,3,0,0],[0,0,0,0,3,3,3,3,3,3,0,0],[0,0,0,0,3,3,3,3,3,3,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,8,8,8,8,8,8,8,8,8,8,8,8,0],[0,0,8,0,0,0,4,4,4,0,0,0,8,0,0],[0,0,8,0,4,4,0,0,0,4,4,8,0,0,0],[0,0,8,4,0,0,0,0,0,0,8,4,0,0,0],[0,0,8,4,0,0,0,0,0,8,0,4,0,0,0],[0,0,4,0,0,0,5,5,5,5,5,5,4,5,5],[0,0,4,0,0,0,5,8,0,0,0,0,4,0,5],[0,0,4,0,0,0,5,0,0,0,0,0,4,0,5],[0,0,8,4,0,8,5,0,0,0,0,4,0,0,5]...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,8,8,8,8,8,8,8,8,8,8,8,8,0],[0,0,8,0,0,0,4,4,4,0,0,0,8,0,0],[0,0,8,0,4,4,0,0,0,4,4,8,0,0,0],[0,0,8,4,0,0,0,0,0,0,8,4,0,0,0],[0,0,8,4,0,0,0,0,0,8,0,4,0,0,0],[0,0,8,0,0,0,5,5,8,5,5,5,5,5,5],[0,0,8,0,0,0,5,8,0,0,0,0,4,0,5],[0,0,8,0,0,0,8,0,0,0,0,0,4,0,5],[0,0,8,4,0,8,5,0,0,0,0,4,0,0,5]...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,5,5,5,5,5,5,5,5,5,0,0],[0,0,5,0,0,0,0,0,0,0,0,5,0,0],[0,0,5,0,0,0,0,0,0,0,0,5,0,0],[0,0,5,0,0,0,0,0,0,0,0,5,0,0],[0,0,5,0,0,0,7,7,7,7,7,5,0,0],[0,0,5,0,0,0,7,7,7,7,7,5,0,0],[0,0,5,5,5,5,7,7,7,7,7,5,0,0],[0,0,0,0,0,0,7,7,7,7,7,0,0,0],...
"""Generator for Test2/t43: reverse the front-to-back occlusion order of objects. Rule: - The input shows several recognizable objects stacked/occluding one another. - Their front-to-back order is uniquely identifiable from the visible overlaps. - Reconstruct each full object, then reverse the depth order: the previou...
"""Verifier for Test2/t43 reverse occlusion order rule.""" from __future__ import annotations from typing import List from generator import transform_t43 Grid = List[List[int]] def verify_t43(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp...
t44
[{"input":[[0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,7,7,7,7,7,7,7,7,7,7,7,7,7,0,0],[0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0],[0,0,7,0,5,5,5,5,5,5,5,5,5,0,7,0,0],[0,0,7,0,5,0,0,0,0,0,0,0,5,0,7,0,0],[0,0,7,0,5,0,4,4,4,4,4,0,5,0,7,0,0],[0,0,7,0,5,0,4,0,0,0,4,0,5,0,7,0,0],[0,0,7,0,0,0,4,0,1,0,...
[[0,0,0,0,0,0,0,0,0,0,0],[0,1,1,1,1,1,1,1,1,1,0],[0,1,3,3,3,3,3,3,3,1,0],[0,1,3,6,6,6,6,6,3,1,0],[0,1,3,6,8,8,8,6,3,1,0],[0,0,3,0,8,7,8,6,0,1,0],[0,1,3,6,8,0,8,6,3,1,0],[0,1,3,6,6,6,6,6,3,1,0],[0,1,3,3,3,3,3,3,3,1,0],[0,1,1,1,1,1,1,1,1,1,0],[0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,7,0,0,0,0,0]]
[[0,0,0],[6,6,6],[3,0,0],[1,1,1]]
{"train":[{"input":[[0,0,0,0,0,0,0,7,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,2,2,2,2,2,2,2,2,2,2,2,2,0],[0,2,1,1,1,1,1,0,1,1,1,1,1,2,0],[0,2,1,4,4,4,4,4,4,4,4,4,1,2,0],[0,2,1,4,5,5,5,5,5,5,5,4,1,2,0],[0,2,1,4,5,6,6,6,6,6,5,4,1,2,0],[0,2,1,4,5,6,0,0,0,6,5,4,1,2,0],[0,0,1,4,0,6,0,7,0,0,5,4,1,2,0],[0,2,1,4,5,6...
"""Generator for Test2/t44: count rotations needed to align outline gaps. Rule: - The input has two cells of one marker color: one at the center of a nest of concentric square outlines, and one on the grid edge aligned horizontally or vertically with the center. - Each square outline has exactly one gap at the mid...
"""Verifier for Test2/t44 gap-rotation-count rule.""" from __future__ import annotations from typing import List from generator import transform_t44 Grid = List[List[int]] def verify_t44(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) ...
t45
[{"input":[[1,1,1,1,1,1,4,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,2,1,1,1,1,1,1,1,1],[1,1,1,2,1,1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1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,8,1,1,1,1,1,1,1,1,6,1,1,1,1,1,1...
"""Generator for Test2/t45: toggle shadow and light from a yellow marker. Rule: - A yellow (4) marker is placed at a corner or the midpoint of one edge. - The grid has a single non-black/non-yellow background color. - Non-background, non-yellow cells cast black shadows away from the marker: * from an edge midpoint...
"""Verifier for Test2/t45 toggle shadow/light rule.""" from __future__ import annotations from typing import List from generator import transform_t45 Grid = List[List[int]] def verify_t45(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0])...
t46
[{"input":[[0,0,5,8,0],[0,4,5,0,0],[5,5,5,5,5],[0,0,5,7,0],[3,0,5,0,0]],"output":[[7,3,5,8,4],[8,4,5,3,7],[5,5,5,5,5],[4,8,5,7,3],[3,7,5,4,8]]},{"input":[[0,0,5,0,0],[0,1,5,6,0],[5,5,5,5,5],[0,0,5,0,0],[8,0,5,0,9]],"output":[[6,8,5,9,1],[9,1,5,6,8],[5,5,5,5,5],[1,9,5,8,6],[8,6,5,1,9]]},{"input":[[7,0,5,0,0],[0,0,5,3,0]...
[[0,0,5,0,8],[0,6,5,0,0],[5,5,5,5,5],[3,0,5,0,0],[0,0,5,4,0]]
[[4,3,5,6,8],[8,6,5,3,4],[5,5,5,5,5],[3,4,5,8,6],[6,8,5,4,3]]
{"train":[{"input":[[0,1,5,0,0],[0,0,5,4,0],[5,5,5,5,5],[0,9,5,0,0],[0,0,5,8,0]],"output":[[4,1,5,9,8],[9,8,5,4,1],[5,5,5,5,5],[8,9,5,1,4],[1,4,5,8,9]]},{"input":[[0,0,5,0,0],[7,0,5,1,0],[5,5,5,5,5],[0,0,5,0,0],[0,9,5,0,3]],"output":[[9,1,5,3,7],[7,3,5,1,9],[5,5,5,5,5],[3,7,5,9,1],[1,9,5,7,3]]},{"input":[[0,0,5,4,0],[3...
"""Generator for Test2/t46: 4-color sudoku over 2x2 quadrants. Rule: - The grid is always 5x5. - The middle row and middle column are gray (5), splitting the grid into four 2x2 quadrants. - The four non-gray colors must fill the sixteen non-gray cells. - No row, column, or 2x2 quadrant may contain the same color twi...
"""Verifier for Test2/t46 4-color sudoku quadrants rule.""" from __future__ import annotations from typing import List from generator import transform_t46 Grid = List[List[int]] def verify_t46(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") if len(inp...
t47
[{"input":[[4,4,2,4,4,4,5,4,4,4,3,4,4],[4,4,2,2,4,4,5,3,4,3,4,4,4],[4,2,4,2,2,4,5,3,4,3,4,4,4],[4,4,4,4,4,4,5,4,4,3,4,3,3],[2,2,4,2,4,4,5,3,4,4,4,4,3],[4,4,4,4,2,2,5,3,3,3,4,4,3]],"output":[[0,0,2,3,0,0],[3,0,0,2,0,0],[3,2,3,2,2,0],[0,0,3,0,3,3],[0,2,0,2,0,3],[3,3,3,0,2,0]]},{"input":[[8,8,8,8,7,8,8],[8,8,7,8,8,8,8],[8...
[[1,1,1,4,4,5,1,1,1,9,1],[4,4,1,1,4,5,9,9,1,9,9],[1,1,4,1,1,5,1,1,1,1,1],[1,4,4,4,1,5,9,1,9,9,1],[4,1,4,1,1,5,1,1,1,9,1],[4,4,4,1,1,5,1,9,1,1,1],[1,1,1,4,1,5,1,9,9,9,1],[1,4,1,1,4,5,1,9,1,9,1],[1,4,4,1,1,5,1,9,1,1,1]]
[[0,0,0,0,4],[0,0,0,9,0],[0,0,4,0,0],[9,4,0,0,0],[4,0,4,9,0],[4,0,4,0,0],[0,9,9,0,0],[0,0,0,9,4],[0,0,4,0,0]]
{"train":[{"input":[[1,1,1,4,1,1,4,1,1,5,7,1,7,7,1,1,7,7,1],[1,4,1,1,1,1,4,1,4,5,1,1,1,1,1,7,1,7,1],[1,1,1,1,1,4,1,4,4,5,7,1,1,7,1,1,1,7,7],[4,1,4,4,4,4,1,1,1,5,1,1,1,1,1,7,1,7,7],[4,1,4,1,1,4,1,1,4,5,1,1,1,7,1,7,7,1,1],[1,4,1,1,4,1,4,1,1,5,7,1,1,7,1,7,7,7,7],[1,1,1,1,4,4,4,4,4,5,1,1,1,1,1,1,7,1,1],[1,1,4,4,1,4,1,4,4,5...
"""Generator for Test2/t47: XOR two halves separated by a gray line. Rule: - The input consists of two equal-size halves separated by a full gray (5) line. - The halves share one background color. - Each half has exactly one non-background foreground color. - For each corresponding location, output: - the left/top...
"""Verifier for Test2/t47 XOR-halves rule.""" from __future__ import annotations from typing import List from generator import transform_t47 Grid = List[List[int]] def verify_t47(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") w = len(inp[0]) if a...
t48
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,3,3,3,3,3,0,0],[0,0,0,0,3,3,3,3,3,4,4,4,3,0,0],[0,0,0,0,3,6,6,6,3,4,4,4,3,0,0],[0,0,0,0,3,6,6,6,3,4,4,4,3,0,0],[0,0,0,0,3,6,3,3,3,3,4,4,3,0,0],[0,0,0,0,3,6,3,5,5,3,3,3,3,3,0],[0,0,0,0,3,6,3,5,5,3,8,8,8,3,0],[0,0,0,3,3,3,3,3,3,3,8,8,8,3,0],[0,0,0,3,0,0,0,0,3,8,...
[[0,0,0,6,6,6,6,6,0,0,0,0,0,0,0,0,0],[0,0,0,6,4,4,4,6,6,6,6,0,0,0,0,0,0],[0,0,0,6,4,4,4,6,0,0,6,6,6,6,6,6,0],[0,0,0,6,4,4,4,6,0,0,6,5,5,5,5,6,0],[0,0,0,6,4,4,4,6,0,0,6,5,5,5,5,6,0],[6,6,6,6,6,6,6,6,6,6,6,6,6,5,5,6,0],[6,8,8,8,8,8,6,9,9,9,9,9,6,5,5,6,0],[6,8,8,8,8,8,6,9,9,9,9,9,6,6,6,6,0],[6,6,6,6,6,6,6,9,9,9,9,9,6,0,0,...
[[0,0,0,6,6,6,6,6,0,0,0,0,0,0,0,0,0],[0,0,0,6,4,4,4,6,6,6,6,0,0,0,0,0,0],[0,0,0,6,4,4,4,6,8,8,6,6,6,6,6,6,0],[0,0,0,6,4,4,4,6,8,8,6,5,5,5,5,6,0],[0,0,0,6,4,4,4,6,8,8,6,5,5,5,5,6,0],[6,6,6,6,6,6,6,6,6,6,6,6,6,5,5,6,0],[6,8,8,8,8,8,6,9,9,9,9,9,6,5,5,6,0],[6,8,8,8,8,8,6,9,9,9,9,9,6,6,6,6,0],[6,6,6,6,6,6,6,9,9,9,9,9,6,0,0,...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,7,7,7,7,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,7,8,8,7,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,7,8,8,7,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,7,8,8,7,0,0,0,0,0,0,0,0,0],[0,7,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0],[0,7,8,8,8,8,7,0,0,7...
"""Generator for Test2/t48: uniquely completable four-color map coloring. Rule: - The last row begins with four palette colors. - In the map area above, one boundary color (not in the palette) forms the map walls, enclosing several regions. - Some regions are already colored with palette colors; at least one region ...
"""Verifier for Test2/t48 uniquely completable four-color map coloring.""" from __future__ import annotations from typing import List from generator import transform_t48 Grid = List[List[int]] def verify_t48(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty")...
t49
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0],[0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],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es connected by an MST. Rule: - The input contains several 2x2 nodes, all in one non-black/non-gray color. - Two nodes can be connected only when their 2x2 blocks have the same top row or the same left column. - The weight of a valid connection is the gap distance between t...
"""Verifier for Test2/t49 aligned-node minimal-spanning-tree rule.""" from __future__ import annotations from typing import List from generator import transform_t49 Grid = List[List[int]] def verify_t49(inp: Grid) -> Grid: if not inp or not inp[0]: raise ValueError("input grid must be non-empty") ...
t50
[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,0,0,5,7,0,5,7,0,5,0,0],[0,0,7,0,0,0,0,0,0,0,0,7,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,7,0,5,0,0,3,7,0,5,0,0],[0,0,0,0,0,7,0,0,0,0,0,7,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,5,0,0,5,7,0,5,7,0,5,0,0],[0,0,7,0,0,0,0,0,0,0,0,7,0,0],[0,0,0,0,...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,5,0,7,5,0,7,5,0,0,5,7,0,5,0],[0,7,0,0,0,0,0,0,0,0,0,0,0,7,0],[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0],[0,1,7,0,5,0,0,5,7,0,5,0,0,5,0],[0,0,0,0,7,0,0,0,0,0,0,0,0,7,0],[0,7,0,0,0,0,0,7,0,0,0,0,0,0,0],[0,5,0,0,5,0,0,5,0,0,5,7,0,5,0],[0,0,0,0,7,0,0,0,0,0,0,0,0,7,0],[0,7,0,0,0,0,0,7,0,0,0,0,0,0,0]...
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,5,0,7,5,0,7,5,0,0,1,1,1,1,0],[0,7,0,0,0,0,0,0,0,0,1,0,0,1,0],[0,0,0,0,0,0,0,0,0,0,1,0,0,1,0],[0,5,7,0,5,0,0,1,1,1,1,0,0,1,0],[0,0,0,0,7,0,0,1,0,0,0,0,0,1,0],[0,7,0,0,0,0,0,1,0,0,0,0,0,1,0],[0,5,0,0,5,0,0,1,0,0,5,7,0,1,0],[0,0,0,0,7,0,0,1,0,0,0,0,0,1,0],[0,7,0,0,0,0,0,1,0,0,0,0,0,1,0]...
{"train":[{"input":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,5,0,0,5,0,7,5,0,7,5,0,7,5,0,0,0],[0,7,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0],[0,5,7,0,5,7,0,5,0,7,9,0,7,5,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0...
""" Generator for t50: Functional-graph cycle detection → polygon drawing. Layout ------ Nodes occupy a regular (R_n × C_n) sub-grid inside the pixel grid. Each node sits at pixel position (r0 + ri * s, c0 + ci * s) where (ri, ci) is its 0-based node-grid index, r0/c0 are the top-left offsets, and s is the node...
""" Verifier for t50: Functional-graph cycle detection → polygon drawing. Rule ---- The input is a pixel grid containing: • Gray (5) nodes arranged on a regular sub-grid. • Exactly one highlighted node (any colour ≠ 0, 5, 7) — the start. • For every node (gray or highlighted) exactly one adjacent (4-connected) ...