← b6592c220670 · b6c499e1fa78 →

b6ba2d176fe8

Find every nonzero monochrome 4-connected object, sort the objects by their left bbox column, and paint each solid bbox rectangle on a fresh same-size zero grid. The first rectangle starts at (0,0). After painting a rectangle of height h and width w, advance the next top-left by (h-1,w-1), so consecutive rectangles share exactly one corner and the later color overwrites that shared cell.

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))
                (objs (objects g 0))
                (sorted (sort-by objs (lambda (o) (second (obj-bbox o)))))
                (infos (map (lambda (o)
                              (let ((bb (obj-bbox o)))
                                (list (obj-color o)
                                      (+ 1 (- (nth bb 2) (nth bb 0)))
                                      (+ 1 (- (nth bb 3) (nth bb 1))))))
                            sorted))
                (blank (cellmap g (r c v) 0))
                (result (reduce (lambda (state info)
                                  (let* ((grid (first state))
                                         (cr (second state))
                                         (cc (third state))
                                         (color (first info))
                                         (oh (second info))
                                         (ow (third info)))
                                    (list (recolor-cells grid
                                                         (flatmap (lambda (dr)
                                                                    (map (lambda (dc)
                                                                           (cons (+ cr
                                                                                    dr)
                                                                                 (+ cc
                                                                                    dc)))
                                                                         (range 0 ow)))
                                                                  (range 0 oh))
                                                         color)
                                          (+ cr (- oh 1))
                                          (+ cc (- ow 1)))))
                                (list blank 0 0)
                                infos)))
           (first result))))

Provenance

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