← 67c14e0f76b1 · 67ec1565020d →

67e9e17efb62

A rectangular 0-background grid contains exactly one contiguous, single-color bar on row 0, touching either the left or right edge. Let its color be k and length be L. The output is the row-major wrapping of colored run lengths 1,2,...,L,L-1,...,2,1, with exactly one 0 between successive runs; the final output row is padded with 0s to the input width. The input height and bar position do not alter the run sequence.

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 top-row (row g 0))
             (define color (find (lambda (v) (!= v 0)) top-row))
             (define L (count-if (lambda (v) (!= v 0)) top-row))
             (define lengths (append (range 1 (+ L 1)) (range (- L 1) 0 -1)))
             (define segments
               (map (lambda (k) (map (lambda (_) color) (range 0 k))) lengths))
             (define (join-segs segs)
               (if (null? segs)
                   (list)
                   (if (null? (cdr segs))
                       (first segs)
                       (append (first segs) (cons 0 (join-segs (cdr segs)))))))
             (define pyramid (join-segs segments))
             (define plen (length pyramid))
             (define oh (quotient (+ plen w (- 1)) w))
             (define total (* oh w))
             (define padded
               (append pyramid (map (lambda (_) 0) (range 0 (- total plen)))))
             (define (take lst k)
               (if (zero? k) (list) (cons (first lst) (take (cdr lst) (- k 1)))))
             (define (drop lst k) (if (zero? k) lst (drop (cdr lst) (- k 1))))
             (define (chunks lst k)
               (if (null? lst) (list) (cons (take lst k) (chunks (drop lst k) k))))
             (chunks padded w)))))

Provenance

Generator
generators/67e9e17efb62/generator.py
Notes and decisions
generators/67e9e17efb62/notes.md
Review label
reviewed_safe
Generator SHA-256
13448fabdbcd33fcaf640a2703ca099ea463aac1da11cbdbce569adae062f145
Rule hash
824697c034e9
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 67e9e17efb62 --count 1 --seed 20261108 --test 1