← d5a059b0f3a6 · d5d9fdb01bdd →

d5af7195f6da

A 7-row color-5 arena contains two to four singleton seed cells. Zeros take the unique nearest seed COLOR by wall-aware four-neighbor BFS; different-color ties and seedless chambers stay zero. Four scheduled profiles guarantee evidence for ties, wall detours, unreachable cells, and equal-distance same-color seeds. Seven demonstrations provide one spare copy of every profile so any of the eight pairs can be held out as query.

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!
 ;; Geodesic Voronoi: every empty cell takes the color of its NEAREST seed,
 ;; where distance flows through non-wall cells (gray 5 = wall). Cells tied
 ;; between different colors stay 0 — the black frontier lines.
 (lambda (g)
   (let ()
     (define h (rows g))
     (define w (cols g))
     (define (dist-map seed)
       ;; single-source BFS -> grid of hop counts (-1 = unreachable)
       (let loop ((frontier (list seed))
                  (dist (set-cell (grid-from-fn h w (lambda (r c) -1))
                                  (first seed) (second seed) 0))
                  (d 0))
         (if (null? frontier)
             dist
             (let ((next (filter (lambda (p)
                                   (and (in-bounds? (first p) (second p) h w)
                                        (!= (at g (first p) (second p)) 5)
                                        (= (at dist (first p) (second p)) -1)))
                                 (remove-duplicates
                                  (flatmap (lambda (p)
                                             (map (lambda (dd)
                                                    (list (+ (first p) (first dd))
                                                          (+ (second p) (second dd))))
                                                  cardinal-deltas))
                                           frontier)))))
               (loop next
                     (for/fold ((acc dist)) ((p (in-list next)))
                       (set-cell acc (first p) (second p) (+ d 1)))
                     (+ d 1))))))
     (define seed-maps
       (map (lambda (s) (cons (at g (first s) (second s)) (dist-map s)))
            (filter (lambda (p) (not (member? (at g (first p) (second p)) (list 0 5))))
                    (grid-positions g))))
     (cellmap g (r c v)
       (if (!= v 0)
           v
           (let ((reach (filter (lambda (x) (>= (first x) 0))
                                (map (lambda (m) (list (at (cdr m) r c) (car m)))
                                     seed-maps))))
             (if (null? reach)
                 0
                 (let* ((best (apply min (map first reach)))
                        (cols (remove-duplicates
                               (map second
                                    (filter (lambda (x) (= (first x) best)) reach)))))
                   (if (= (length cols) 1) (first cols) 0)))))))))

Provenance

Generator
generators/d5af7195f6da/generator.py
Notes and decisions
generators/d5af7195f6da/notes.md
Review label
reviewed_safe
Generator SHA-256
897916ea4e2e6b7812581ff0fd621b80e05694a4eda5606b96ed439049c9b34c
Rule hash
ca2bc3cf692f
Sources
bank:5b06d39592a3
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate d5af7195f6da --count 1 --seed 20261108 --test 1