← 82bce7d23c06 · 832404dc8a5c →

82e4aea30adc

A zero-background grid contains one to five isolated monochrome hollow rectangular frames. For each frame, inspect every zero cell strictly inside its bounding box. If that interior consists of exactly one cell, fill it gray (5); otherwise fill every interior cell orange (7). Frame borders and all exterior background cells remain unchanged.

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)))
    ;; Treat each non-background component as a hollow rectangular frame.
    (let* ((objs (objects g 0)))
      (reduce
        (lambda (grid obj)
          (let* ((bb (obj-bbox obj))
                 ;; Move each bounding-box edge inward to address the interior.
                 (r1 (+ 1 (nth bb 0)))
                 (c1 (+ 1 (nth bb 1)))
                 (r2 (- (nth bb 2) 1))
                 (c2 (- (nth bb 3) 1))
                 (ih (+ 1 (- r2 r1)))
                 (iw (+ 1 (- c2 c1)))
                 ;; A one-cell interior is gray; every larger interior is orange.
                 (fc (if (= (* ih iw) 1) 5 7)))
            ;; Preserve frame borders and exterior cells; fill only zero interiors.
            (reduce
              (lambda (g2 rc)
                (if (zero? (at g2 (fst rc) (snd rc)))
                    (set-cell g2 (fst rc) (snd rc) fc)
                    g2))
              grid
              (flatmap
                (lambda (kr)
                  (map (lambda (kc) (cons kr kc))
                       (range c1 (+ c2 1))))
                (range r1 (+ r2 1))))))
        g
        objs)))))

Provenance

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