← 5e0575c16ab4 · 5e619caf1f27 →
5e5205e54c96
Variable-size grid with a top-row legend of 2-4 distinct nonzero colors and 2-4 nested hollow color-8 frames below it. Color 8 is lawful in the legend because frame discovery ignores row 0. The canonical rule keeps the frame borders and fills each annular interior, outer-to-inner, with the corresponding left-to-right legend color; the deepest color fills the innermost open region.
parametric familyframe depthlegend usenested structures
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-border? obj)
(let* ((bb (obj-bbox obj))
(h (+ (- (third bb) (first bb)) 1))
(w (+ (- (fourth bb) (second bb)) 1))
(border-size (- (* h w) (* (max 0 (- h 2)) (max 0 (- w 2))))))
(and (>= h 3) (>= w 3) (= (obj-size obj) border-size)
(all? (lambda (p)
(or (= (first p) (first bb)) (= (first p) (third bb))
(= (second p) (second bb)) (= (second p) (fourth bb))))
(obj-cells obj)))))
(let* ((legend (filter (lambda (v) (not (= v 0))) (first g)))
(frames (sort (filter (lambda (obj) (> (obj-r1 obj) 0))
(filter rect-border? (objects (keep-only g 8) 0)))
(lambda (a b) (> (* (obj-h a) (obj-w a)) (* (obj-h b) (obj-w b)))))))
(for/fold ([out g]) ([frame (in-list frames)] [idx (in-naturals)])
(let ((inner (if (< (+ idx 1) (length frames)) (list-ref frames (+ idx 1)) #f))
(color (list-ref legend (min idx (- (length legend) 1)))))
(for*/fold ([acc out])
([r (in-range (+ (obj-r1 frame) 1) (obj-r2 frame))]
[c (in-range (+ (obj-c1 frame) 1) (obj-c2 frame))])
(if (and inner
(>= r (obj-r1 inner)) (<= r (obj-r2 inner))
(>= c (obj-c1 inner)) (<= c (obj-c2 inner)))
acc
(set-cell acc r c color))))))))Provenance
- Generator
- generators/5e5205e54c96/generator.py
- Notes and decisions
- generators/5e5205e54c96/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 9498bb87aa50b3c101080a655087e0d810b5652fe2a730f6f0175fb9310cd488
- Rule hash
- b178b586d79d
- Sources
- bank:0527e10c7137
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5e5205e54c96 --count 1 --seed 20261108 --test 1