← e07bbcbe6ba4 · e14a91c50791 →

e0ef0cfeaf88

Place a monochrome 2x2 body on background 0 with one to four diagonal corner tails; the rule extends every tail diagonally away from the body through the grid edge.

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)))
           (let* ((cells (for*/list ((r (range 0 h)) (c (range 0 w)) #:when (!= (at g r c) 0))
                           (list r c)))
                  (color (at g (first (car cells)) (second (car cells))))
                  (body-tl #f)
                  (dummy (for ((cell cells))
                           (let ((r (first cell))
                                 (c (second cell)))
                             (when
                               (and
                                 (not body-tl)
                                 (member (list (+ r 1) c) cells)
                                 (member (list r (+ c 1)) cells)
                                 (member (list (+ r 1) (+ c 1)) cells))
                               (set! body-tl (list r c))))))
                  (br (first body-tl))
                  (bc (second body-tl))
                  (body-set (list (list br bc)
                                  (list (+ br 1) bc)
                                  (list br (+ bc 1))
                                  (list (+ br 1) (+ bc 1))))
                  (tails (filter (lambda (c) (not (member c body-set))) cells))
                  (bcr2 (+ (* 2 br) 1))
                  (bcc2 (+ (* 2 bc) 1))
                  (result (make-hash)))
             (for* ((r (range 0 h)) (c (range 0 w)))
                   (hash-set! result (list r c) (at g r c)))
             (for ((tail tails))
               (let* ((tr (first tail))
                      (tc (second tail))
                      (dr (cond ((< (* 2 tr) bcr2) -1) ((> (* 2 tr) bcr2) 1) (else 0)))
                      (dc (cond ((< (* 2 tc) bcc2) -1) ((> (* 2 tc) bcc2) 1) (else 0))))
                 (let loop
                      ((r (+ tr dr)) (c (+ tc dc)))
                      (when
                        (and (>= r 0) (< r h) (>= c 0) (< c w))
                        (hash-set! result (list r c) color)
                        (loop (+ r dr) (+ c dc))))))
             (cellmap g (r c v) (hash-ref result (list r c) 0))))))

Provenance

Generator
generators/e0ef0cfeaf88/generator.py
Notes and decisions
generators/e0ef0cfeaf88/notes.md
Review label
reviewed_safe
Generator SHA-256
23aa605d1cfcff168349f74db8dd99d2d0bc23eb7c702ff84a1db07739f2ecf9
Rule hash
44a4f74471b9
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e0ef0cfeaf88 --count 1 --seed 20261108 --test 1