← d7b84df5a06a · d7f13ee34d85 →

d7c15b2e56ec

Recolor every nested component to the color of its outermost enclosing rectangular frame; preserve independent uncontained components.

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 ((objs (objects grid 0)))
           (cellmap grid
                    (r c v)
                    (if (zero? v)
                        0
                        (let ((containing (filter (lambda (o)
                                                    (and
                                                      (>= r (fst (obj-bbox o)))
                                                      (<= r (nth (obj-bbox o) 2))
                                                      (>= c (nth (obj-bbox o) 1))
                                                      (<= c (nth (obj-bbox o) 3))))
                                                  objs)))
                          (if (null? containing)
                              v
                              (obj-color (car (sort-by containing
                                                       (lambda (o)
                                                         (* -1
                                                            (* (+ 1
                                                                  (- (nth (obj-bbox o)
                                                                          2)
                                                                     (fst (obj-bbox o))))
                                                               (+ 1
                                                                  (- (nth (obj-bbox o)
                                                                          3)
                                                                     (nth (obj-bbox o)
                                                                          1))))))))))))))))

Provenance

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