← 66387591ebe6 · 666934e5ac80 →

664a918eb273

Join separated monochrome paths in left-to-right order, preserving the first path position. Align each later entry one cell right of the previous exit, preserve input height, and trim the right edge. Safe constructive sampling mixes 3-row canonical-like scenes with 4..12-row extensions, 2..5 paths, repeated colors, longer shapes, and variable left margins.

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)))
           (begin
             (define objs (objects-multicolor g 0))
             (define (obj-leftmost-col o) (min-of second (obj-cells o)))
             (define sorted-objs (sort-by objs obj-leftmost-col))
             (define (cell-deg cells c)
               (count-if (lambda (o)
                           (or
                             (and
                               (= (first o) (first c))
                               (= (abs (- (second o) (second c))) 1))
                             (and
                               (= (second o) (second c))
                               (= (abs (- (first o) (first c))) 1))))
                         cells))
             (define (obj-info o)
               (let* ((cells (obj-cells o))
                      (sorted (sort-by cells
                                       (lambda (c) (+ (* 100 (second c)) (first c)))))
                      (leftmost (first sorted))
                      (color (at g (first leftmost) (second leftmost)))
                      (endpoints (filter (lambda (c) (= (cell-deg cells c) 1)) cells))
                      (other-end (find (lambda (c) (!= c leftmost)) endpoints))
                      (exit (if other-end other-end leftmost)))
                 (list cells leftmost exit color)))
             (define infos (map obj-info sorted-objs))
             (define (shift-cells cells dr dc)
               (map (lambda (c) (list (+ (first c) dr) (+ (second c) dc))) cells))
             (define (process is prev-exit acc)
               (if (null? is)
                   acc
                   (let* ((info (first is))
                          (cells (nth info 0))
                          (leftmost (nth info 1))
                          (exit (nth info 2))
                          (color (nth info 3))
                          (target-row (first prev-exit))
                          (target-col (+ (second prev-exit) 1))
                          (dr (- target-row (first leftmost)))
                          (dc (- target-col (second leftmost)))
                          (new-cells (shift-cells cells dr dc))
                          (new-exit (list (+ (first exit) dr) (+ (second exit) dc)))
                          (cells-with-color (map (lambda (c)
                                                   (list (first c) (second c) color))
                                                 new-cells)))
                     (process (cdr is) new-exit (append acc cells-with-color)))))
             (define first-info (first infos))
             (define first-cells (nth first-info 0))
             (define first-color (nth first-info 3))
             (define first-exit (nth first-info 2))
             (define first-with-color
               (map (lambda (c) (list (first c) (second c) first-color)) first-cells))
             (define all-cells (process (cdr infos) first-exit first-with-color))
             (define max-col (max-of second all-cells))
             (define out-w (+ max-col 1))
             (define empty-g (build-grid h out-w (r c) 0))
             (reduce (lambda (gg cell)
                       (set-cell gg (first cell) (second cell) (nth cell 2)))
                     empty-g
                     all-cells)))))

Provenance

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