← 2f0f072d3d7e · 2f58238f8bb6 →
2f4a0e633093
Three top-row legend colors crossed with three fixed 3x3 mask panels.
parametric familyfactorized decodinggallery constructionrecoloring
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) (filter (lambda (p) (not (= (at grid (first p) (second p)) 0))) (grid-positions grid))) (define (crop-nonzero grid) (let ((cells (nonzero-cells grid))) (if (empty? cells) (list (list 0)) (let* ((bb (bbox-of-cells cells))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))))) (define (recolor-grid grid color) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 color)))) (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 (e11b-binary grid) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 1)))) (define (e11b-normal-binary grid) (e11b-binary (crop-nonzero grid))) (let* ((colors (filter (lambda (v) (not (= v 0))) (first g))) (masks (list (e11b-normal-binary (subgrid g 2 0 4 2)) (e11b-normal-binary (subgrid g 2 4 4 6)) (e11b-normal-binary (subgrid g 2 8 4 10))))) (for*/fold ((out (empty-grid 11 11 0))) ((i (in-range 3)) (j (in-range (length colors)))) (e8b-paste out (recolor-grid (list-ref masks i) (list-ref colors j)) (* i 4) (* j 4))))))
Provenance
- Generator
- generators/2f4a0e633093/generator.py
- Notes and decisions
- generators/2f4a0e633093/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 70fb10faa795f1574fcd51810d3af0fe063dd0b3a539e503f150f0a111d44f19
- Rule hash
- a8c480313578
- Sources
- bank:392b6b954bfd
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 2f4a0e633093 --count 1 --seed 20261108 --test 1