← 144582f287b5 · 147c2b92e5c1 →

144c5d002191

One connected template of 4..7 cells and 2..5 singleton markers. Stamp its binary bounding-box shape at each marker, recolored to that marker; clip individual out-of-bounds cells, with later row-major markers winning overlaps.

parametric familyrecolorstampingtemplate

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 (component-grid obj) (for/fold ((out (empty-grid (+ 1 (- (obj-r2 obj) (obj-r1 obj))) (+ 1 (- (obj-c2 obj) (obj-c1 obj))) 0))) ((p (in-list (obj-cells obj)))) (set-cell out (- (first p) (obj-r1 obj)) (- (second p) (obj-c1 obj)) (obj-color obj)))) (define (paste-crop grid shape top left) (for*/fold ((out grid)) ((r (in-range (rows shape))) (c (in-range (cols shape)))) (let ((v (at shape r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows grid) (cols grid))) (set-cell out rr cc v) out)))) (define (recolor-shape shape color) (grid-from-fn (rows shape) (cols shape) (lambda (r c) (if (= (at shape r c) 0) 0 color)))) (define (binary-shape shape) (grid-from-fn (rows shape) (cols shape) (lambda (r c) (if (= (at shape r c) 0) 0 1)))) (let* ((comps (objects g 0)) (template (first (filter (lambda (obj) (> (obj-size obj) 1)) (sort comps (lambda (a b) (> (obj-size a) (obj-size b))))))) (template-shape (binary-shape (component-grid template))) (template-cells (obj-cells template)) (markers (filter (lambda (obj) (and (= (obj-size obj) 1) (not (member? (first (obj-cells obj)) template-cells)))) comps))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((marker (in-list markers))) (let* ((p (first (obj-cells marker))) (shape (recolor-shape template-shape (obj-color marker)))) (paste-crop out shape (first p) (second p)))))))

Provenance

Generator
generators/144c5d002191/generator.py
Notes and decisions
generators/144c5d002191/notes.md
Review label
reviewed_safe
Generator SHA-256
616644a1bffebb2adc85789f699373fa3be15ca499b99137fc2547f41f17b631
Rule hash
c3118b3e9e62
Sources
bank:483ae17489fc
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 144c5d002191 --count 1 --seed 20261108 --test 1