← bb41378fe3c8 · bb75d495c809 →
bb432515d2e6
A closed color-5 frame contains two or three distinct-colored seeds. Zeros take the unique nearest seed color by wall-aware 4-neighbor BFS; finite ties and seedless chambers remain zero. Three scheduled profiles guarantee tie, wall-detour, and unreachable-component evidence.
obstacle-aware distanceshortest pathstie handling
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).
Reference rule (Racket)
(rule!
(let ((seeds (filter (lambda (cell) (and (not (= (third cell) 0)) (not (= (third cell) 5))))
(grid-cells g))))
(define (shortest-distance r c seed)
(let ((visited (make-hash)))
(let bfs ([queue (list (list r c 0))])
(cond [(empty? queue) 999]
[else
(let* ((cur (first queue))
(rr (first cur))
(cc (second cur))
(dist (third cur))
(restq (rest queue)))
(cond [(hash-has-key? visited (list rr cc)) (bfs restq)]
[(not (in-bounds? rr cc (rows g) (cols g))) (bfs restq)]
[(= (at g rr cc) 5) (bfs restq)]
[(and (= rr (first seed)) (= cc (second seed))) dist]
[else
(hash-set! visited (list rr cc) #t)
(bfs (append restq
(map (lambda (d)
(list (+ rr (first d)) (+ cc (second d)) (+ dist 1)))
cardinal-deltas)))]))]))))
(define (fill-value r c)
(let* ((distances (map (lambda (seed) (list (shortest-distance r c seed) (third seed))) seeds))
(dmin (apply min (map first distances)))
(colors (remove-duplicates (map second (filter (lambda (x) (= (first x) dmin)) distances)))))
(if (and (< dmin 999) (= (length colors) 1)) (first colors) 0)))
(grid-from-fn (rows g) (cols g)
(lambda (r c)
(if (and (= (at g r c) 0) (not (= (at g r c) 5)))
(fill-value r c)
(at g r c))))))Provenance
- Generator
- generators/bb432515d2e6/generator.py
- Notes and decisions
- generators/bb432515d2e6/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- bce22c67c8568ad56994f276fe911d57c141046e823c6042638abf19b5de136e
- Rule hash
- 823ef34eb751
- Sources
- bank:9a66c53abf7f
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate bb432515d2e6 --count 1 --seed 20261108 --test 1