← 31a4112b4151 · 31e0316dace3 →

31b8bedd699a

On a black canvas, retain 2..5 separated monochrome hollow rectangular frames and discard 0..3 solid rectangles. Compare the ranges of frame top-left rows and columns; use a column iff row range is strictly greater, otherwise a row. Sort along that axis and redraw each frame as a fixed 4x4 outline of its color, including repeated colors.

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 (grid)
         (let* ((h (rows grid))
                (w (cols grid))
                (objs (objects grid 0))
                (frames (filter (lambda (o)
                                  (let* ((bb (obj-bbox o))
                                         (bh (+ 1 (- (third bb) (first bb))))
                                         (bw (+ 1 (- (fourth bb) (second bb)))))
                                    (< (obj-size o) (* bh bw))))
                                objs))
                (frame-info (map (lambda (o)
                                   (let ((bb (obj-bbox o)))
                                     (list (obj-color o) (first bb) (second bb))))
                                 frames))
                (rows-list (map second frame-info))
                (cols-list (map (lambda (f) (list-ref f 2)) frame-info))
                (row-range (- (max-list rows-list) (min-list rows-list)))
                (col-range (- (max-list cols-list) (min-list cols-list)))
                (vertical (> row-range col-range))
                (sorted-frames (sort-by frame-info
                                        (lambda (f)
                                          (if vertical (second f) (list-ref f 2)))))
                (n (length sorted-frames)))
           (if vertical
               (build-grid (* n 4)
                           4
                           (r c)
                           (let* ((idx (quotient r 4))
                                  (lr (remainder r 4))
                                  (lc c)
                                  (color (first (list-ref sorted-frames idx))))
                             (if (or (zero? lr) (= lr 3) (zero? lc) (= lc 3)) color 0)))
               (build-grid 4
                           (* n 4)
                           (r c)
                           (let* ((idx (quotient c 4))
                                  (lr r)
                                  (lc (remainder c 4))
                                  (color (first (list-ref sorted-frames idx))))
                             (if (or (zero? lr) (= lr 3) (zero? lc) (= lc 3)) color 0)))))))

Provenance

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