← 864eaaac6503 · 866b956f2402 →

865e48425b05

Read the sparse row-0 palette left-to-right; crop the connected color-1 mask below row 1; emit one recolored copy per palette entry with one blank column between copies.

parametric familydynamic templatinglegend decodingmask extraction

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).

Reference rule (Racket)

(rule!
  (let* ((palette (filter (lambda (v) (not (= v 0))) (row g 0)))
         (bb (bbox-of-cells (find-color g 1)))
         (mask (grid-from-fn (+ (- (third bb) (first bb)) 1)
                             (+ (- (fourth bb) (second bb)) 1)
                 (lambda (r c)
                   (if (= (at g (+ (first bb) r) (+ (second bb) c)) 1) 1 0)))))
    (define copies
      (map (lambda (color)
             (grid-from-fn (rows mask) (cols mask)
               (lambda (r c) (if (= (at mask r c) 1) color 0))))
           palette))
    (define out-h (rows mask))
    (define out-w (+ (apply + (map cols copies)) (max 0 (- (length copies) 1))))
    (let pack ([remaining copies] [left 0] [out (empty-grid out-h out-w 0)])
      (if (empty? remaining)
          out
          (let* ((p (first remaining))
                 (next (for*/fold ([acc out])
                                   ([r (in-range (rows p))]
                                    [c (in-range (cols p))])
                         (let ((v (at p r c)))
                           (if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
            (pack (rest remaining) (+ left (cols p) 1) next))))))

Provenance

Generator
generators/865e48425b05/generator.py
Notes and decisions
generators/865e48425b05/notes.md
Review label
reviewed_safe
Generator SHA-256
e2f12c1139f6fea5940fe2ccc7cbe4cc9ee81f07f992abda8953273e508beff9
Rule hash
efb1009fca26
Sources
bank:8ed83d4e427b
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 865e48425b05 --count 1 --seed 20261108 --test 1