← 4ac45a758a2e · 4b787be81422 →
4b326abc33f4
Find each hollow gray frame, read its single colored side seed at the vertical midpoint, and fill that frame's interior with the seed color.
parametric familyframessame_sizeseeded_fill
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 (py-bbox obj) (list (obj-r1 obj) (obj-r2 obj) (obj-c1 obj) (obj-c2 obj))) (define (py-bb< a b) (cond ((not (= (first a) (first b))) (< (first a) (first b))) ((not (= (second a) (second b))) (< (second a) (second b))) ((not (= (third a) (third b))) (< (third a) (third b))) (else (< (fourth a) (fourth b))))) (define (rect-frame? obj) (let* ((r0 (obj-r1 obj)) (r1 (obj-r2 obj)) (c0 (obj-c1 obj)) (c1 (obj-c2 obj))) (and (= (obj-color obj) 5) (all? (lambda (p) (let ((r (first p)) (c (second p))) (or (= r r0) (= r r1) (= c c0) (= c c1)))) (obj-cells obj)) (all? (lambda (p) (= (at g (first p) (second p)) 5)) (append (for/list ((c (in-range c0 (+ c1 1)))) (list r0 c)) (for/list ((c (in-range c0 (+ c1 1)))) (list r1 c)) (for/list ((r (in-range r0 (+ r1 1)))) (list r c0)) (for/list ((r (in-range r0 (+ r1 1)))) (list r c1))))))) (define (frame-bbs grid) (sort (map py-bbox (filter rect-frame? (objects grid 0))) py-bb<)) (for/fold ((out g)) ((bb (in-list (frame-bbs g)))) (let* ((r0 (first bb)) (r1 (second bb)) (c0 (third bb)) (c1 (fourth bb)) (mid (quotient (+ r0 r1) 2)) (left-seed (if (>= (- c0 1) 0) (at g mid (- c0 1)) 0)) (seed (if (and (= left-seed 0) (< (+ c1 1) (cols g))) (at g mid (+ c1 1)) left-seed))) (if (or (= seed 0) (= seed 5)) out (for*/fold ((acc out)) ((r (in-range (+ r0 1) r1)) (c (in-range (+ c0 1) c1))) (set-cell acc r c seed)))))))
Provenance
- Generator
- generators/4b326abc33f4/generator.py
- Notes and decisions
- generators/4b326abc33f4/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- e561cdec520f52a74c0c9295dc1b2fd1bf0ede969795403c86d28242048278bd
- Rule hash
- b18855f77d40
- Sources
- bank:d994e8798bff
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 4b326abc33f4 --count 1 --seed 20261108 --test 1