← fdb8815ba528 · fe0dc9f32b7b →

fdffdd0bbde7

A 3--6 row top library holds 2--4 color-keyed stencils, each defined relative to its visible color-9 anchor and separated by full-height 9-columns. A blank row precedes 4--8 body seeds. On a blank output, stamp each seed's matching anchor-relative stencil, clipping in-bounds.

parametric familycolor-keyed rule lookuplibrary extractionmultiple arbitrary stencils in one grid

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 (nonzero-cells grid) (sort (filter (lambda (cell) (not (= (third cell) 0))) (grid-cells grid)) (lambda (a b) (cell< (list (first a) (second a)) (list (first b) (second b)))))) (define (panel-bounds-9 grid top-rows) (define sep-cols (filter (lambda (c) (all? (lambda (r) (= (at grid r c) 9)) (range 0 top-rows))) (range 0 (cols grid)))) (define bounds (append (list -1) sep-cols (list (cols grid)))) (let loop ((xs bounds) (acc (list))) (if (empty? (rest xs)) (reverse acc) (let ((left (+ (first xs) 1)) (right (- (second xs) 1))) (loop (rest xs) (if (<= left right) (cons (list left right) acc) acc)))))) (define (stamp-offsets out anchor offsets color) (paint-cells out (filter (lambda (p) (in-bounds? (first p) (second p) (rows out) (cols out))) (map (lambda (d) (list (+ (first anchor) (first d)) (+ (second anchor) (second d)))) offsets)) color)) (define top-rows (first (filter (lambda (r) (all? (lambda (c) (= (at g r c) 0)) (range 0 (cols g)))) (range 0 (rows g))))) (define bounds (panel-bounds-9 g top-rows)) (define entries (map (lambda (bb) (let* ((c1 (first bb)) (c2 (second bb)) (panel-cells (filter (lambda (cell) (and (< (first cell) top-rows) (<= c1 (second cell)) (<= (second cell) c2))) (nonzero-cells g))) (anchor (first (filter (lambda (cell) (= (third cell) 9)) panel-cells))) (colors (remove-duplicates (filter (lambda (v) (not (= v 9))) (map third panel-cells)))) (color (first colors)) (offsets (map (lambda (cell) (list (- (first cell) (first anchor)) (- (second cell) (second anchor)))) (filter (lambda (cell) (= (third cell) color)) panel-cells)))) (list color offsets))) bounds)) (define body-cells (filter (lambda (cell) (> (first cell) top-rows)) (nonzero-cells g))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((cell (in-list body-cells))) (let* ((color (third cell)) (entry (first (filter (lambda (e) (= (first e) color)) entries)))) (stamp-offsets out (list (first cell) (second cell)) (second entry) color)))))

Provenance

Generator
generators/fdffdd0bbde7/generator.py
Notes and decisions
generators/fdffdd0bbde7/notes.md
Review label
reviewed_safe
Generator SHA-256
b382282399f261a1a04883f8e4478c53b455b5dc7264376e230ed4f62a673cd9
Rule hash
66637f26ea98
Sources
bank:1f065edbcf08
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate fdffdd0bbde7 --count 1 --seed 20261108 --test 1