← 98a65dc7fcb1 · 9900de625ddd →

98c4483164f7

A 2x2 motif uses red (2) cells as diagonal direction markers; recolor the motif to its other color and launch that color from all four motif cells toward every marked quadrant.

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))
                (block-cells (flatmap (lambda (r)
                                        (filter (lambda (p)
                                                  (!= (at g (first p) (snd p)) 0))
                                                (map (lambda (kc) (list r kc))
                                                     (range 0 w))))
                                      (range 0 h)))
                (ctr-r (/ (+ 0.0
                             (+ (min-of first block-cells) (max-of first block-cells)))
                          2.0))
                (ctr-c (/ (+ 0.0 (+ (min-of snd block-cells) (max-of snd block-cells)))
                          2.0))
                (main-color (find (lambda (c) (and (!= c 0) (!= c 2))) (grid-colors g)))
                (red-cells (filter (lambda (p) (= (at g (first p) (snd p)) 2))
                                   block-cells))
                (all-dirs (list (list -1 -1) (list -1 1) (list 1 -1) (list 1 1)))
                (active-dirs (filter (lambda (dir)
                                       (any? (lambda (p)
                                               (and
                                                 (= (if (< (first p) ctr-r) -1 1)
                                                    (first dir))
                                                 (= (if (< (snd p) ctr-c) -1 1)
                                                    (snd dir))))
                                             red-cells))
                                     all-dirs))
                (g0 (recolor-cells g block-cells main-color))
                (result (reduce (lambda (acc cell)
                                  (reduce (lambda (g2 dir)
                                            (reduce (lambda (g3 k)
                                                      (let* ((nr (+ (first cell)
                                                                    (* k (first dir))))
                                                             (nc (+ (snd cell)
                                                                    (* k (snd dir)))))
                                                        (if (in-bounds? nr nc h w)
                                                            (set-cell g3
                                                                      nr
                                                                      nc
                                                                      main-color)
                                                            g3)))
                                                    g2
                                                    (range 1 (max h w))))
                                          acc
                                          active-dirs))
                                g0
                                block-cells)))
           result)))

Provenance

Generator
generators/98c4483164f7/generator.py
Notes and decisions
generators/98c4483164f7/notes.md
Review label
reviewed_safe
Generator SHA-256
34e2b872a68979a620411d5ea434100d2489073e19bc74fe4e72602945603a78
Rule hash
18ad2f5cfd8b
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 98c4483164f7 --count 1 --seed 20261108 --test 1