← 3a0af56db83e · 3a6ce35e3549 →

3a4b67ab16ff

Intersect each marker-color bounding box with the gray bounding rectangle, filling intersections in ascending color order.

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* ((grays (find-color g 5))
                  (gr0 (min-of fst grays))
                  (gr1 (max-of fst grays))
                  (gc0 (min-of snd grays))
                  (gc1 (max-of snd grays))
                  (base (cellmap g
                                 (r c v)
                                 (if (and (>= r gr0) (<= r gr1) (>= c gc0) (<= c gc1))
                                     5
                                     0))))
             (reduce (lambda (acc color)
                       (if (= color 5)
                           acc
                           (let ((cells (find-color g color)))
                             (if (zero? (length cells))
                                 acc
                                 (let ((ir0 (max (min-of fst cells) gr0))
                                       (ir1 (min (max-of fst cells) gr1))
                                       (ic0 (max (min-of snd cells) gc0))
                                       (ic1 (min (max-of snd cells) gc1)))
                                   (reduce (lambda (a r)
                                             (reduce (lambda (a2 c)
                                                       (set-cell a2 r c color))
                                                     a
                                                     (range ic0 (+ ic1 1))))
                                           acc
                                           (range ir0 (+ ir1 1))))))))
                     base
                     (range 1 10))))))

Provenance

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