← cd818a9d92d1 · cddbee92b2f3 →

cdb267535df8

Wall-geodesic Voronoi with 4-6 seed cells, 2-4 seed colors, varied barriers, different-color ties, and repeated-color nearest-seed witnesses. Two repeat-color profiles in each four-draw cycle support query rotations.

distancefillwalls

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! (let ((dummy 0)) (define (geodesic-distance grid start goal wall-color) (let ((queue (list (list (first start) (second start) 0))) (seen (make-hash)) (found #f)) (define (search) (unless (or (empty? queue) found) (define cur (first queue)) (set! queue (rest queue)) (define p (list (first cur) (second cur))) (define d (third cur)) (if (equal? p goal) (set! found d) (begin (for ((delta (in-list cardinal-deltas))) (define rr (+ (first p) (first delta))) (define cc (+ (second p) (second delta))) (define np (list rr cc)) (when (and (in-bounds? rr cc (rows grid) (cols grid)) (not (= (at grid rr cc) wall-color)) (not (hash-has-key? seen np))) (hash-set! seen np #t) (set! queue (append queue (list (list rr cc (+ d 1))))))) (search))))) (hash-set! seen start #t) (search) found)) (let* ((seeds (filter values (map (lambda (p) (let ((v (at g (first p) (second p)))) (if (and (not (= v 0)) (not (= v 5))) (list (first p) (second p) v) #f))) (grid-positions g))))) (for*/fold ((out g)) ((r (in-range (rows g))) (c (in-range (cols g)))) (if (not (= (at g r c) 0)) out (let* ((dist-rows (filter values (map (lambda (s) (let ((d (geodesic-distance g (list (first s) (second s)) (list r c) 5))) (if d (list d (third s)) #f))) seeds))) (mind (if (empty? dist-rows) #f (apply min (map first dist-rows))))) (if (not mind) out (let* ((nearest (filter (lambda (x) (= (first x) mind)) dist-rows)) (colors (remove-duplicates (map second nearest)))) (if (= (length colors) 1) (set-cell out r c (first colors)) out)))))))))

Provenance

Generator
generators/cdb267535df8/generator.py
Notes and decisions
generators/cdb267535df8/notes.md
Review label
reviewed_safe
Generator SHA-256
1b860d59e505465a7266b509834a2d30fa94ff883bb2b8659bafbf1c7e533f83
Rule hash
cb6c4f271562
Sources
bank:d994e8798bff
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate cdb267535df8 --count 1 --seed 20261108 --test 1