← e438ce3e02ce · e46c2557ad08 →

e44712f65f3e

A zero-background grid contains one or more disjoint solid square nested frames. Each frame has a uniform nonzero outer ring and a distinct uniform nonzero inner fill. The canonical output expands every frame about its center into a larger rounded nested frame motif.

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)))
           (let* ((objs (objects-multicolor g 0)))
             (reduce (lambda (acc obj)
                       (let* ((bb (obj-bbox obj))
                              (r0 (fst bb))
                              (c0 (snd bb))
                              (r1 (nth bb 2))
                              (c1 (nth bb 3))
                              (bh (+ 1 (- r1 r0)))
                              (bw (+ 1 (- c1 c0)))
                              (outer (at g r0 c0))
                              (inner-vals (filter (lambda (v)
                                                    (and (!= v 0) (!= v outer)))
                                                  (map (lambda (p)
                                                         (at g (fst p) (snd p)))
                                                       (obj-cells obj))))
                              (inner (if (empty? inner-vals) outer (fst inner-vals)))
                              (th (quotient bh 2))
                              (tw (quotient bw 2))
                              (oh (if (zero? (remainder bh 2)) (* 2 bh) (- (* 2 bh) 1)))
                              (ow (if (zero? (remainder bw 2)) (* 2 bw) (- (* 2 bw) 1)))
                              (tr (- r0 th))
                              (tc (- c0 tw)))
                         (reduce (lambda (a rr)
                                   (reduce (lambda (aa cc)
                                             (let* ((gr (+ tr rr))
                                                    (gc (+ tc cc))
                                                    (in-inner (and
                                                                (>= rr th)
                                                                (< rr (- oh th))
                                                                (>= cc tw)
                                                                (< cc (- ow tw))))
                                                    (inner-border (and
                                                                    in-inner
                                                                    (or
                                                                      (= rr th)
                                                                      (= rr (- oh th 1))
                                                                      (= cc tw)
                                                                      (= cc (- ow tw 1)))))
                                                    (inner-core (and
                                                                  in-inner
                                                                  (not inner-border)))
                                                    (outer-band (or
                                                                  (and
                                                                    (< rr th)
                                                                    (>= cc tw)
                                                                    (< cc (- ow tw)))
                                                                  (and
                                                                    (>= rr (- oh th))
                                                                    (>= cc tw)
                                                                    (< cc (- ow tw)))
                                                                  (and
                                                                    (< cc tw)
                                                                    (>= rr th)
                                                                    (< rr (- oh th)))
                                                                  (and
                                                                    (>= cc (- ow tw))
                                                                    (>= rr th)
                                                                    (< rr (- oh th))))))
                                               (cond
                                                 ((not (in-bounds? gr gc h w)) aa)
                                                 (inner-border (set-cell aa gr gc inner))
                                                 (inner-core (set-cell aa gr gc outer))
                                                 (outer-band (set-cell aa gr gc outer))
                                                 (else aa))))
                                           a
                                           (range 0 ow)))
                                 acc
                                 (range 0 oh))))
                     (cellmap g (r c v) 0)
                     objs)))))

Provenance

Generator
generators/e44712f65f3e/generator.py
Notes and decisions
generators/e44712f65f3e/notes.md
Review label
reviewed_safe
Generator SHA-256
ae646fc3dbca68090e9364ebb5df7f3dce668d2d469346baec583546603368c2
Rule hash
1a62f4b43149
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e44712f65f3e --count 1 --seed 20261108 --test 1