← 49898d244b5f · 49bfa2fd18b7 →
498af9326ab9
Mark the union of all shortest start-to-goal paths through zero cells while preserving markers and gray walls.
parametric family
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* ((start (first (find-color g 1)))
(goal (first (find-color g 2))))
(define (dist-from start)
(define dist (make-hash))
(define queue (list (cons (first start) (second start))))
(hash-set! dist (first queue) 0)
(let bfs ([fuel 0])
(unless (empty? queue)
(let ((cur (first queue)))
(set! queue (rest queue))
(for ([d (in-list cardinal-deltas)])
(let ((nr (+ (car cur) (first d))) (nc (+ (cdr cur) (second d))))
(when (and (in-bounds? nr nc (rows g) (cols g))
(not (= (at g nr nc) 5))
(not (hash-has-key? dist (cons nr nc))))
(hash-set! dist (cons nr nc) (+ (hash-ref dist cur) 1))
(set! queue (append queue (list (cons nr nc))))))))
(bfs (+ fuel 1))))
dist)
(define ds (dist-from start))
(define dg (dist-from goal))
(define D (hash-ref ds (cons (first goal) (second goal)) 999999))
(grid-from-fn (rows g) (cols g)
(lambda (r c)
(if (and (= (at g r c) 0)
(< D 999999)
(hash-has-key? ds (cons r c))
(hash-has-key? dg (cons r c))
(= (+ (hash-ref ds (cons r c)) (hash-ref dg (cons r c))) D))
8
(at g r c))))))Provenance
- Generator
- generators/498af9326ab9/generator.py
- Notes and decisions
- generators/498af9326ab9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f19086ed76a796847d938f1e6499dce712b233f42d9955d2758106abbbc8ff68
- Rule hash
- 067c9281e33e
- Sources
- bank:8edfaf6db623
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 498af9326ab9 --count 1 --seed 20261108 --test 1