← 34f8510e39d0 · 36275402c6b2 →

35368341e72e

Distinct keys in row 0 label 3x3 prototypes in rows 1-3. The nonzero keys in the final row form an ordered query, and the answer galleries the corresponding prototypes with one zero column between copies.

parametric family

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 (e8b-paste grid pat top left) (for*/fold ((out grid)) ((r (in-range (rows pat))) (c (in-range (cols pat)))) (let ((v (at pat r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows out) (cols out))) (set-cell out rr cc v) out)))) (define (s17b-gallery-row objs (gap 1)) (if (empty? objs) (list (list 0)) (let* ((h (apply max (map rows objs))) (w (+ (apply + (map cols objs)) (* gap (- (length objs) 1))))) (let loop ((rest-objs objs) (left 0) (out (empty-grid h w 0))) (if (empty? rest-objs) out (let ((obj (first rest-objs))) (loop (rest rest-objs) (+ left (cols obj) gap) (e8b-paste out obj 0 left)))))))) (define (t13-prototype-groups grid) (map (lambda (c) (list (- c 1) (+ c 1) (at grid 0 c))) (filter (lambda (c) (not (= (at grid 0 c) 0))) (range (cols grid))))) (let* ((groups (t13-prototype-groups g)) (query (filter (lambda (v) (not (= v 0))) (last g))) (parts (map (lambda (key) (let ((grp (first (filter (lambda (entry) (= (third entry) key)) groups)))) (subgrid g 1 (first grp) 3 (second grp)))) query))) (if (empty? query) (list (list 0)) (s17b-gallery-row parts 1)))))

Provenance

Generator
generators/35368341e72e/generator.py
Notes and decisions
generators/35368341e72e/notes.md
Review label
reviewed_safe
Generator SHA-256
c9684fe1e2f9b3a74dd8474424b2a3098b328eb07f34f458e18c1aa6b83ca265
Rule hash
dfe1312c69fd
Sources
bank:05283c9df3d9
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 35368341e72e --count 1 --seed 20261108 --test 1