← aa378df15340 · aad4e3a1d5e3 →

aa45957d8241

Read the distinct nonzero colours across row 0 from left to right. For each listed colour, find its unique same-colour body component, crop that object to its bounding box, and pack the selected crops left-to-right with one zero column between them. Ignore unlisted distractor objects. Default lessons include distractors and cases where body position disagrees with the header order.

marker_selectionorderingrelayout

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!
  (let* ((seq (filter (lambda (v) (not (= v 0))) (first g)))
         (body (for/list ([r (in-range (rows g))])
                 (for/list ([c (in-range (cols g))])
                   (if (= r 0) 0 (at g r c)))))
         (objs (objects body 0)))
    (define (shape-for color)
      (let ((obj (first (filter (lambda (candidate) (= (obj-color candidate) color)) objs))))
        (subgrid body (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))))
    (define shapes (map shape-for seq))
    (define out-h (apply max (map rows shapes)))
    (define out-w (+ (apply + (map cols shapes)) (max 0 (- (length shapes) 1))))
    (let pack ([remaining shapes] [left 0] [out (empty-grid out-h out-w 0)])
      (if (empty? remaining)
          out
          (let* ((shape (first remaining))
                 (next (for*/fold ([acc out])
                                   ([r (in-range (rows shape))]
                                    [c (in-range (cols shape))])
                         (let ((v (at shape r c)))
                           (if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
            (pack (rest remaining) (+ left (cols shape) 1) next))))))

Provenance

Generator
generators/aa45957d8241/generator.py
Notes and decisions
generators/aa45957d8241/notes.md
Review label
reviewed_safe
Generator SHA-256
338b4690fae09e6bdc89a528ed029a24a5873f702d56ba335e6547e783963dd6
Rule hash
b2f937b0b8b5
Sources
bank:276b5e4c56a1
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate aa45957d8241 --count 1 --seed 20261108 --test 1