← 94549757a7f3 · 94755460a402 →
946e33609350
A color-1 rectangular frame contains two or three distinct singleton seeds. Zeros take the unique nearest seed color by wall-aware 4-neighbor BFS; equal-distance ties remain zero. A three-example schedule guarantees an open tie and horizontal/vertical one-gap wall detours.
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 dirs4 (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))) (define (e11-dist-lookup dists cell) (second (first (filter (lambda (pair) (equal? (first pair) cell)) dists)))) (define (e15-bfs-dist-open grid seed wall) (let loop ((queue (list seed)) (seen (list seed)) (dists (list (list seed 0)))) (if (empty? queue) dists (let* ((cur (first queue)) (curd (e11-dist-lookup dists cur)) (nbrs (filter (lambda (p) (and (in-bounds? (first p) (second p) (rows grid) (cols grid)) (not (member? p seen)) (not (= (at grid (first p) (second p)) wall)))) (map (lambda (d) (list (+ (first cur) (first d)) (+ (second cur) (second d)))) dirs4))) (new-dists (append dists (map (lambda (p) (list p (+ curd 1))) nbrs)))) (loop (append (rest queue) nbrs) (append seen nbrs) new-dists))))) (define (e15-dist-maybe dists cell) (let ((hit (filter (lambda (pair) (equal? (first pair) cell)) dists))) (if (empty? hit) #f (second (first hit))))) (let* ((seeds (filter values (for*/list ((r (in-range (rows g))) (c (in-range (cols g)))) (let ((v (at g r c))) (if (member? v (list 0 1)) #f (list r c v)))))) (dist-maps (map (lambda (seed) (list (third seed) (e15-bfs-dist-open g (list (first seed) (second seed)) 1))) seeds))) (grid-from-fn (rows g) (cols g) (lambda (r c) (if (not (= (at g r c) 0)) (at g r c) (let* ((p (list r c)) (cands (filter values (map (lambda (entry) (let ((d (e15-dist-maybe (second entry) p))) (if d (list d (first entry)) #f))) dist-maps)))) (if (empty? cands) 0 (let* ((best (apply min (map first cands))) (colors (remove-duplicates (map second (filter (lambda (x) (= (first x) best)) cands))))) (if (= (length colors) 1) (first colors) 0))))))))))
Provenance
- Generator
- generators/946e33609350/generator.py
- Notes and decisions
- generators/946e33609350/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 565b51fe9ad3fa0cf9f13cb44bb5a534a035319232b45e9ca5dc76f769c63537
- Rule hash
- 1ec8459f97ec
- Sources
- bank:84602fe0e9ce
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 946e33609350 --count 1 --seed 20261108 --test 1