← d4d38f319c8f · d4f2f542248a →
d4ea5a7deae6
A 0-background 10..16 x 13..20 grid contains one or two separated color-1 rectangular frames. Each frame has exactly one token in {2,3,4} and one seed in {5,6,7,8,9}. Token 2 paints a plus, token 3 an X, and token 4 a full 3x3 footprint in the seed color, clipped to the strict frame interior. Default scenes use two frames with distinct tokens and seed colors and mix centered and clipped footprints.
frame localizationseed expansionsymbol-conditioned rule
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).
Reference rule (Racket)
(rule!
(let ((dummy 0))
(define (rect-frame? obj)
(and (= (obj-color obj) 1)
(>= (obj-h obj) 3)
(>= (obj-w obj) 3)
(= (obj-size obj) (- (* (obj-h obj) (obj-w obj))
(* (- (obj-h obj) 2) (- (obj-w obj) 2))))
(all? (lambda (p)
(or (= (first p) (obj-r1 obj))
(= (first p) (obj-r2 obj))
(= (second p) (obj-c1 obj))
(= (second p) (obj-c2 obj))))
(obj-cells obj))))
(define (kernel token)
(cond [(= token 2) (list (list 0 0) (list -1 0) (list 1 0) (list 0 -1) (list 0 1))]
[(= token 3) (list (list 0 0) (list -1 -1) (list -1 1) (list 1 -1) (list 1 1))]
[else (for*/list ([dr (in-range -1 2)] [dc (in-range -1 2)]) (list dr dc))]))
(define (paint-frame out frame)
(let* ((interior (positions-in-rect (+ (obj-r1 frame) 1) (+ (obj-c1 frame) 1)
(- (obj-r2 frame) 1) (- (obj-c2 frame) 1)))
(interior-cells
(filter (lambda (p) (not (= (at g (first p) (second p)) 0))) interior))
(token-cells
(filter (lambda (p) (member? (at g (first p) (second p)) (list 2 3 4))) interior-cells))
(seed-cells
(filter (lambda (p) (not (member? (at g (first p) (second p)) (list 2 3 4)))) interior-cells)))
(if (or (empty? token-cells) (empty? seed-cells))
out
(let* ((token (at g (first (last token-cells)) (second (last token-cells))))
(seed (last seed-cells))
(sr (first seed))
(sc (second seed))
(color (at g sr sc))
(cells
(filter (lambda (p)
(and (> (first p) (obj-r1 frame)) (< (first p) (obj-r2 frame))
(> (second p) (obj-c1 frame)) (< (second p) (obj-c2 frame))))
(map (lambda (d) (list (+ sr (first d)) (+ sc (second d)))) (kernel token)))))
(paint-cells out cells color)))))
(let ((frames (sort (filter rect-frame? (objects g 0))
(lambda (a b)
(if (= (obj-r1 a) (obj-r1 b))
(< (obj-c1 a) (obj-c1 b))
(< (obj-r1 a) (obj-r1 b)))))))
(for/fold ([out (grid-from-fn (rows g) (cols g)
(lambda (r c) (if (= (at g r c) 1) 1 0)))])
([frame (in-list frames)])
(paint-frame out frame)))))Provenance
- Generator
- generators/d4ea5a7deae6/generator.py
- Notes and decisions
- generators/d4ea5a7deae6/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- de9ab54c1aadf474c7571ee30545bbd8054b3598c98bbcfbf70588246006e73d
- Rule hash
- efb277668cb4
- Sources
- bank:edd0efb19ea0
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d4ea5a7deae6 --count 1 --seed 20261108 --test 1