← 5e5205e54c96 · 5e8e4691afde →
5e619caf1f27
Find the solid outer rectangle and the distinct solid inner rectangle. Preserve both, then add an outer frame in the inner color whose thickness is min(inner height, inner width, top/left/bottom/right grid margin).
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! (lambda (g)
(let* ((h (rows g))
(w (cols g))
;; The non-zero bounding box is the original outer rectangle.
(cells (positions-of g (lambda (v) (!= v 0))))
(bb (bbox-of-cells cells))
(r1 (first bb))
(c1 (second bb))
(r2 (third bb))
(c2 (fourth bb))
(outer (at g r1 c1))
;; The other non-zero color forms the solid inner rectangle.
(inner-cells
(filter (lambda (p)
(!= (at g (first p) (second p)) outer))
cells))
(ibb (bbox-of-cells inner-cells))
(ir1 (first ibb))
(ic1 (second ibb))
(ir2 (third ibb))
(ic2 (fourth ibb))
(inner (at g ir1 ic1))
(inner-h (+ 1 (- ir2 ir1)))
(inner-w (+ 1 (- ic2 ic1)))
;; Expand uniformly, capped by both inner size and every grid edge.
(thick (min inner-h inner-w r1 c1
(- (- h 1) r2) (- (- w 1) c2)))
(nr1 (- r1 thick))
(nc1 (- c1 thick))
(nr2 (+ r2 thick))
(nc2 (+ c2 thick)))
(cellmap g
(r c v)
(if (and (>= r nr1) (<= r nr2)
(>= c nc1) (<= c nc2)
(not (and (>= r r1) (<= r r2)
(>= c c1) (<= c c2))))
inner
v)))))Provenance
- Generator
- generators/5e619caf1f27/generator.py
- Notes and decisions
- generators/5e619caf1f27/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 26823bf15131f6e72cbf896a170e2a7e9813c09e3f8f2ec41ee3de159ad0064f
- Rule hash
- ca7c525a09b4
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5e619caf1f27 --count 1 --seed 20261108 --test 1