← b1972482cb43 · b1e6ee6856bf →

b19deac47327

Two opposite borders have distinct colors. Each color-1 marker projects the color of its matching border into the adjacent cell toward that border: up/left in the first half and down/right in the second half.

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* ((top-color (at g 0 0))
                  (bottom-color (at g (- h 1) 0))
                  (left-color (at g 0 0))
                  (right-color (at g 0 (- w 1)))
                  (top-bottom? (and
                                 (!= top-color 0)
                                 (!= bottom-color 0)
                                 (for/and ((c (range 0 w))) (= (at g 0 c) top-color))
                                 (for/and ((c (range 0 w)))
                                          (= (at g (- h 1) c) bottom-color))))
                  (left-right? (and
                                 (!= left-color 0)
                                 (!= right-color 0)
                                 (for/and ((r (range 0 h))) (= (at g r 0) left-color))
                                 (for/and ((r (range 0 h)))
                                          (= (at g r (- w 1)) right-color)))))
             (cond
               (top-bottom? (reduce (lambda (acc p)
                                      (let* ((r (fst p))
                                             (c (snd p))
                                             (nr (if (< (* 2 r) h) (- r 1) (+ r 1)))
                                             (color (if (< (* 2 r) h)
                                                        top-color
                                                        bottom-color)))
                                        (if (in-bounds? nr c h w)
                                            (set-cell acc nr c color)
                                            acc)))
                                    g
                                    (find-color g 1)))
               (left-right? (reduce (lambda (acc p)
                                      (let* ((r (fst p))
                                             (c (snd p))
                                             (nc (if (< (* 2 c) w) (- c 1) (+ c 1)))
                                             (color (if (< (* 2 c) w)
                                                        left-color
                                                        right-color)))
                                        (if (in-bounds? r nc h w)
                                            (set-cell acc r nc color)
                                            acc)))
                                    g
                                    (find-color g 1)))
               (else g))))))

Provenance

Generator
generators/b19deac47327/generator.py
Notes and decisions
generators/b19deac47327/notes.md
Review label
reviewed_safe
Generator SHA-256
a839ebd14cca90ceeba69e541ea1df87d0e6c8eab9f5e5c01cf01356859efa3f
Rule hash
2b2e46dd36cc
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate b19deac47327 --count 1 --seed 20261108 --test 1