← a55c1997c5e3 · a5bda33d14a0 →

a5ad56f1e9d4

Place one 2..4 by 2..4 solid gray rectangle and two distinct colored markers; recolor each gray cell to its Manhattan-nearest marker, with lower color then row/column resolving ties.

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! (let ((dummy 0)) (define (paint grid cells color) (for/fold ((out grid)) ((p (in-list cells))) (if (in-bounds? (first p) (second p) (rows out) (cols out)) (set-cell out (first p) (second p) color) out))) (let ((seeds (filter (lambda (p) (not (member? (at g (first p) (second p)) (list 0 5)))) (grid-positions g)))) (for*/fold ((out (paint (empty-grid (rows g) (cols g) 0) seeds 0))) ((r (in-range (rows g))) (c (in-range (cols g)))) (cond ((not (member? (at g r c) (list 0 5))) (set-cell out r c (at g r c))) ((= (at g r c) 5) (let* ((ranked (sort seeds (lambda (a b) (let ((da (+ (abs (- r (first a))) (abs (- c (second a))))) (db (+ (abs (- r (first b))) (abs (- c (second b))))) (ca (at g (first a) (second a))) (cb (at g (first b) (second b)))) (cond ((not (= da db)) (< da db)) ((not (= ca cb)) (< ca cb)) ((not (= (first a) (first b))) (< (first a) (first b))) (else (< (second a) (second b)))))))) (best (first ranked))) (set-cell out r c (at g (first best) (second best))))) (else out))))))

Provenance

Generator
generators/a5ad56f1e9d4/generator.py
Notes and decisions
generators/a5ad56f1e9d4/notes.md
Review label
reviewed_safe
Generator SHA-256
9ae0ed6f8da92019c50f0260a4d18c27935feb92a1d33cef02f2f9696c8c7049
Rule hash
7cf87a6a8bce
Sources
bank:c0e651d407f3
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate a5ad56f1e9d4 --count 1 --seed 20261108 --test 1