← 7eba3ddf13bd · 7f03452e81df →

7ef325b21961

A 0-background grid contains 1-3 separated closed single-color rectangular frames. Every frame contains isolated dots of exactly two non-frame colors, with a strict frame-local majority; different frames use different majority colors. Preserve each border, fill its complete interior with that frame's local majority color, and erase all outside distractor dots.

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* ((all-objs (objects g 0))
                  (big-frames (filter (lambda (o) (>= (length (obj-cells o)) 5))
                                      all-objs))
                  (base (cellmap g (r c v) 0))
                  (with-frames (paint-objects-by base
                                                 big-frames
                                                 (lambda (obj) (obj-color obj)))))
             (reduce (lambda (gr frame)
                       (with-bbox frame
                                  (r1 c1 r2 c2)
                                  (let* ((sh (+ 1 (- r2 r1)))
                                         (sw (+ 1 (- c2 c1)))
                                         (frame-cells (obj-cells frame))
                                         (in-frame? (lambda (r c)
                                                      (ormap (lambda (cell)
                                                               (and
                                                                 (= r (first cell))
                                                                 (= c (second cell))))
                                                             frame-cells)))
                                         (mini (build-grid sh
                                                           sw
                                                           (rr cc)
                                                           (if (in-frame? (+ rr r1)
                                                                          (+ cc c1))
                                                               1
                                                               0)))
                                         (bg-comps (objects mini 1))
                                         (interior-comps (filter (lambda (comp)
                                                                   (not (ormap (lambda (cell)
                                                                                 (let ((r (first cell))
                                                                                       (c (second cell)))
                                                                                   (or
                                                                                     (zero? r)
                                                                                     (= r
                                                                                        (- sh
                                                                                           1))
                                                                                     (zero? c)
                                                                                     (= c
                                                                                        (- sw
                                                                                           1)))))
                                                                               (obj-cells comp))))
                                                                 bg-comps))
                                         (interior-cells (flatmap (lambda (comp)
                                                                    (map (lambda (cell)
                                                                           (list (+ (first cell)
                                                                                    r1)
                                                                                 (+ (second cell)
                                                                                    c1)))
                                                                         (obj-cells comp)))
                                                                  interior-comps))
                                         (interior-colors (filter (lambda (v) (!= v 0))
                                                                  (map (lambda (cell)
                                                                         (at g
                                                                             (first cell)
                                                                             (second cell)))
                                                                       interior-cells)))
                                         (unique-colors (unique interior-colors))
                                         (counts (map (lambda (col)
                                                        (list col
                                                              (count-if (lambda (v)
                                                                          (= v col))
                                                                        interior-colors)))
                                                      unique-colors))
                                         (sorted-counts (sort-by counts
                                                                 (lambda (p)
                                                                   (- 0 (second p))))))
                                    (if (null? sorted-counts)
                                        gr
                                        (let ((majority (first (first sorted-counts))))
                                          (recolor-cells gr interior-cells majority))))))
                     with-frames
                     big-frames)))))

Provenance

Generator
generators/7ef325b21961/generator.py
Notes and decisions
generators/7ef325b21961/notes.md
Review label
reviewed_safe
Generator SHA-256
448f40ffad51c4540526ca8715addc0e736a5b6cd5550c2ffa2eb699611c19a5
Rule hash
450273ee54ad
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 7ef325b21961 --count 1 --seed 20261108 --test 1