← bf47583ab6e3 · bf5bed969a6d →

bf53d21ff9fc

Move each active gray marker to the penultimate cell of its adjacent green route while preserving inactive markers, endpoint green, zeros, and unrelated cells.

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))
                (bg 7)
                (grays (find-color g 5)))
           (reduce (lambda (acc gpos)
                     (let* ((gr (fst gpos))
                            (gc (snd gpos))
                            (start-d (find-first (lambda (d)
                                                   (let* ((nr (+ gr (fst d)))
                                                          (nc (+ gc (snd d))))
                                                     (and
                                                       (in-bounds? nr nc h w)
                                                       (= (at g nr nc) 3))))
                                                 cardinal-deltas)))
                       (if (not start-d)
                           acc
                           (let* ((start (list (+ gr (fst start-d))
                                               (+ gc (snd start-d))))
                                  (path (reduce (lambda (p step)
                                                  (let* ((cur (fst p))
                                                         (prev (snd p))
                                                         (trail (nth p 2))
                                                         (next-d (find-first (lambda (d)
                                                                               (let* ((nr (+ (fst cur)
                                                                                             (fst d)))
                                                                                      (nc (+ (snd cur)
                                                                                             (snd d))))
                                                                                 (and
                                                                                   (in-bounds? nr
                                                                                               nc
                                                                                               h
                                                                                               w)
                                                                                   (= (at g
                                                                                          nr
                                                                                          nc)
                                                                                      3)
                                                                                   (not (and
                                                                                          (= nr
                                                                                             (fst prev))
                                                                                          (= nc
                                                                                             (snd prev)))))))
                                                                             cardinal-deltas))
                                                         (next (if next-d
                                                                   (list (+ (fst cur)
                                                                            (fst next-d))
                                                                         (+ (snd cur)
                                                                            (snd next-d)))
                                                                   #f)))
                                                    (if next
                                                        (list next
                                                              cur
                                                              (append trail (list next)))
                                                        p)))
                                                (list start (list gr gc) (list start))
                                                (range 0 (max h w))))
                                  (trail (nth path 2)))
                             (if (< (length trail) 2)
                                 acc
                                 (let* ((cleared (reduce (lambda (a cell)
                                                           (set-cell a
                                                                     (fst cell)
                                                                     (snd cell)
                                                                     bg))
                                                         acc
                                                         trail))
                                        (last (nth trail (- (length trail) 1)))
                                        (second (nth trail (- (length trail) 2))))
                                   (set-cell (set-cell (set-cell cleared
                                                                 (fst last)
                                                                 (snd last)
                                                                 3)
                                                       (fst second)
                                                       (snd second)
                                                       5)
                                             gr
                                             gc
                                             bg)))))))
                   g
                   grays))))

Provenance

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