← 3eff273eeb83 · 3f5263211041 →
3f26d45b9f51
A square (3*K-1)×(3*K-1) lattice of K×K 2x2 cells is separated by single-pixel divider rows/columns in a modal non-zero divider color. Uniform 2x2 marker cells use other colors. For each marker color, fill all coarse cells between same-color markers that share a coarse row or column. A color may connect on both axes, and singleton/off-line markers that share no row/column with a same-color peer stay unchanged.
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)
;; The modal color is the one-pixel lattice divider; 0 is empty cell interior.
(let* ((lc (mode g))
(mcolors (filter (lambda (kc) (and (!= kc 0) (!= kc lc)))
(unique (flatmap (lambda (r) r) (grid->list g))))))
(reduce (lambda (acc mc)
;; Collapse each 2x2 marker block to its coarse lattice coordinate.
(let* ((positions (find-color g mc))
(cpositions (map (lambda (p)
(list (floor (/ (+ (fst p) 1) 3))
(floor (/ (+ (snd p) 1) 3))))
positions))
(crow-set (unique (map fst cpositions)))
(ccol-set (unique (map snd cpositions)))
;; In every coarse row, fill from the leftmost to rightmost
;; same-color marker; rows with fewer than two markers do nothing.
(acc2 (reduce (lambda (a cr)
(let* ((cols-here (map snd
(filter (lambda (cp) (= (fst cp) cr)) cpositions))))
(if (< (length cols-here) 2) a
(let* ((cmin (min-list cols-here))
(cmax (max-list cols-here)))
(reduce (lambda (a2 cc)
(let* ((pr (* 3 cr)) (pc (* 3 cc)))
(set-cell (set-cell (set-cell (set-cell a2 pr pc mc)
pr (+ pc 1) mc) (+ pr 1) pc mc) (+ pr 1) (+ pc 1) mc)))
a (range cmin (+ cmax 1)))))))
acc crow-set)))
;; Apply the same interval rule independently down every coarse column.
;; Singleton or off-line markers therefore remain untouched.
(reduce (lambda (a cc)
(let* ((rows-here (map fst
(filter (lambda (cp) (= (snd cp) cc)) cpositions))))
(if (< (length rows-here) 2) a
(let* ((rmin (min-list rows-here))
(rmax (max-list rows-here)))
(reduce (lambda (a2 cr)
(let* ((pr (* 3 cr)) (pc (* 3 cc)))
(set-cell (set-cell (set-cell (set-cell a2 pr pc mc)
pr (+ pc 1) mc) (+ pr 1) pc mc) (+ pr 1) (+ pc 1) mc)))
a (range rmin (+ rmax 1)))))))
acc2 ccol-set)))
g mcolors))))Provenance
- Generator
- generators/3f26d45b9f51/generator.py
- Notes and decisions
- generators/3f26d45b9f51/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 1bd4448f9ff51545858cb402a42521bd7238925667727911e797a8259ee06f5a
- Rule hash
- 54129d31ff5b
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 3f26d45b9f51 --count 1 --seed 20261108 --test 1