← 38300735cc4d · 395201c95f9d →
394fc1eaa85e
Treat 5s as walls; paint each open 0 cell cyan (8) iff its 4-neighbor shortest-path distances from the unique red (2) and green (3) seeds are both finite and equal. Preserve every other input cell.
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 (dist-from start)
;; Mutable lookup table for dist
(define dist (make-hash))
(define queue (list start))
(hash-set! dist start 0)
(define (bfs)
(unless (empty? queue)
(let* ((p (first queue))
(r (first p))
(c (second p))
(d0 (hash-ref dist p)))
(set! queue (rest queue))
(for ([d (in-list cardinal-deltas)])
(let ((nr (+ r (first d))) (nc (+ c (second d))))
(when (and (in-bounds? nr nc (rows g) (cols g))
(not (= (at g nr nc) 5))
(not (hash-has-key? dist (list nr nc))))
(hash-set! dist (list nr nc) (+ d0 1))
(set! queue (append queue (list (list nr nc)))))))
(bfs))))
(bfs)
dist)
;; Position of the first red(2) cell
(define a (first (find-color g 2)))
;; Position of the first green(3) cell
(define b (first (find-color g 3)))
(define da (dist-from a))
(define db (dist-from b))
(grid-from-fn (rows g) (cols g)
(lambda (r c)
(let ((p (list r c)) (v (at g r c)))
(if (and (= v 0) (hash-has-key? da p) (hash-has-key? db p)
(= (hash-ref da p) (hash-ref db p)))
8
v))))))Provenance
- Generator
- generators/394fc1eaa85e/generator.py
- Notes and decisions
- generators/394fc1eaa85e/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 784de331e6043d6f980c7057e0d814faed0d1ee6b0bad748e893d476b6cb2504
- Rule hash
- bc441550caa9
- Sources
- bank:b18129f611a9
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 394fc1eaa85e --count 1 --seed 20261108 --test 1