← 611cc0f4e0fe · 6143c7ef56be →

613be474907a

Extend two separated colored blocks toward one another by floor(half the gap), filling complete perpendicular lines and preserving an odd middle line.

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* ((all-vals (apply append g))
                (bg (mode-list all-vals))
                (other-colors (filter (lambda (v) (!= v bg)) (unique all-vals)))
                (c1 (first other-colors))
                (c2 (find-first (lambda (v) (!= v c1)) other-colors))
                (bb1 (bbox-of-cells (find-color g c1)))
                (r1min (first bb1))
                (c1min (second bb1))
                (r1max (third bb1))
                (c1max (fourth bb1))
                (bb2 (bbox-of-cells (find-color g c2)))
                (r2min (first bb2))
                (c2min (second bb2))
                (r2max (third bb2))
                (c2max (fourth bb2)))
           (cellmap g
                    (r c v)
                    (cond
                      ((< c1max c2min) (let* ((gs (+ c1max 1))
                               (ge (- c2min 1))
                               (gl (+ 1 (- ge gs)))
                               (half (/ gl 2)))
                          (cond
                            ((and (>= c gs) (< c (+ gs half))) c1)
                            ((and (>= c (+ 1 (- ge half))) (<= c ge)) c2)
                            (else v))))
                      ((< c2max c1min) (let* ((gs (+ c2max 1))
                               (ge (- c1min 1))
                               (gl (+ 1 (- ge gs)))
                               (half (/ gl 2)))
                          (cond
                            ((and (>= c gs) (< c (+ gs half))) c2)
                            ((and (>= c (+ 1 (- ge half))) (<= c ge)) c1)
                            (else v))))
                      ((< r1max r2min) (let* ((gs (+ r1max 1))
                               (ge (- r2min 1))
                               (gl (+ 1 (- ge gs)))
                               (half (/ gl 2)))
                          (cond
                            ((and (>= r gs) (< r (+ gs half))) c1)
                            ((and (>= r (+ 1 (- ge half))) (<= r ge)) c2)
                            (else v))))
                      (else (let* ((gs (+ r2max 1))
                                   (ge (- r1min 1))
                                   (gl (+ 1 (- ge gs)))
                                   (half (/ gl 2)))
                              (cond
                                ((and (>= r gs) (< r (+ gs half))) c2)
                                ((and (>= r (+ 1 (- ge half))) (<= r ge)) c1)
                                (else v)))))))))

Provenance

Generator
generators/613be474907a/generator.py
Notes and decisions
generators/613be474907a/notes.md
Review label
reviewed_safe
Generator SHA-256
63109b6c92deda605161f1faa662a833a6f63d4163b2f2d767e49ee233cb5875
Rule hash
adc52fde010d
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 613be474907a --count 1 --seed 20261108 --test 1