← a287e878de99 · a2b749aefc65 →

a2ad2da63297

0-bg grid (h~9-18, w~9-18) with: (a) a DOMINANT BARRIER — a single LONG straight LINE segment (6-8 cells long, horizontal at random interior row, or vertical at random interior col) in some non-zero barrier_color (the most frequent non-zero color); (b) 2-4 PAIRS of single DOTS on OPPOSITE SIDES of the barrier — each pair shares a column (or row, by orientation) with one dot 2 cells above the barrier and the matched dot 2 cells below (opposite side), in 4 distinct dot_colors. Rule: identify the BARRIER line and its orientation. For EACH (column/row) that has a dot above AND a dot below the barrier, SWAP the two dots: above-dot moves to a cell JUST BELOW the barrier (on the bottom side); below-dot moves to a cell JUST ABOVE the barrier (on the top side). Net: each matched pair of opposite-side dots swaps positions, ending up flush against the barrier on the opposite side.

Generated by the released generator before publication; every output was computed by its Racket reference rule. White outlines mark the cells the rule changed. Lesson check:

refuted: a demonstration contradicts the rival. survived_all: it fits every demonstration and also gives the intended answer, so it cannot mislead here. ambiguous: it fits every demonstration but answers the query differently. Names are as declared by the generator; a declared shortcut is not guaranteed to fit the original pairs (see the paper’s Limitations).

Original task pairs

From the source task; the reference rule must reproduce them.

Reference rule (Racket)

(rule! (lambda (g) (let* ((h (rows g)) (w (cols g))) (let* ((freq (color-frequency g)) (non-bg (filter (lambda (c) (!= c 0)) (grid-colors g))) (barrier-color (first (sort-by non-bg (lambda (c) (- 0 (dict-get freq c 0)))))) (bp (find-color g barrier-color)) (brmin (min-of first bp)) (brmax (max-of first bp)) (bcmin (min-of snd bp)) (bcmax (max-of snd bp)) (is-horiz (> (- bcmax bcmin) (- brmax brmin)))) (if is-horiz (reduce (lambda (acc kc) (let* ((bar-in-col (filter (lambda (p) (= (snd p) kc)) bp)) (top-bar (if (null? bar-in-col) -1 (min-of first bar-in-col))) (bot-bar (if (null? bar-in-col) -1 (max-of first bar-in-col))) (above (find (lambda (r) (and (< r top-bar) (!= (at g r kc) 0) (!= (at g r kc) barrier-color))) (range 0 h))) (below (find (lambda (r) (and (> r bot-bar) (!= (at g r kc) 0) (!= (at g r kc) barrier-color))) (range 0 h)))) (if (and above below (!= top-bar -1)) (let* ((ca (at g above kc)) (cb (at g below kc)) (acc (set-cell acc above kc 0)) (acc (set-cell acc below kc 0)) (acc (set-cell acc (+ bot-bar 1) kc ca)) (acc (set-cell acc (- top-bar 1) kc cb))) acc) acc))) g (range 0 w)) (reduce (lambda (acc kr) (let* ((bar-in-row (filter (lambda (p) (= (first p) kr)) bp)) (left-bar (if (null? bar-in-row) -1 (min-of snd bar-in-row))) (right-bar (if (null? bar-in-row) -1 (max-of snd bar-in-row))) (left-dot (find (lambda (kc) (and (< kc left-bar) (!= (at g kr kc) 0) (!= (at g kr kc) barrier-color))) (range 0 w))) (right-dot (find (lambda (kc) (and (> kc right-bar) (!= (at g kr kc) 0) (!= (at g kr kc) barrier-color))) (range 0 w)))) (if (and left-dot right-dot (!= left-bar -1)) (let* ((cl (at g kr left-dot)) (cr (at g kr right-dot)) (acc (set-cell acc kr left-dot 0)) (acc (set-cell acc kr right-dot 0)) (acc (set-cell acc kr (+ right-bar 1) cl)) (acc (set-cell acc kr (- left-bar 1) cr))) acc) acc))) g (range 0 h)))))))

Provenance

Generator
generators/a2ad2da63297/generator.py
Notes and decisions
generators/a2ad2da63297/notes.md
Review label
reviewed_safe
Generator SHA-256
d78d73f541b1bf889c623c0f583d263236196fa975c0f4a37c13fed0dcd500a8
Rule hash
937e30cc1e90
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate a2ad2da63297 --count 1 --seed 20261108 --test 1