← df0d6baae973 · df3c6021b715 →
df17e660cb8e
A border-walled maze uses color 8 for walls and color 0 for open cells. It contains exactly one start marker 2, one end marker 3, checkpoints 4 and 5, and optionally checkpoint 6. Visit markers in numeric order 2 -> 4 -> 5 -> [6] -> 3. For each consecutive pair, take its unique shortest four-neighbor path through non-8 cells and paint only the zero cells on the combined path color 7. Preserve walls and all markers.
mazeorderingpathfinding
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 (bfs-path grid start goal) (define queue (list start)) (define prev (make-hash)) (hash-set! prev start #f) (define (search) (unless (or (empty? queue) (hash-has-key? prev goal)) (define cur (first queue)) (set! queue (rest queue)) (for ((d (in-list cardinal-deltas))) (define nr (+ (first cur) (first d))) (define nc (+ (second cur) (second d))) (define p (list nr nc)) (when (and (in-bounds? nr nc (rows grid) (cols grid)) (not (= (at grid nr nc) 8)) (not (hash-has-key? prev p))) (hash-set! prev p cur) (set! queue (append queue (list p))))) (search))) (search) (let rebuild ((cur goal) (acc (list))) (if (eq? cur #f) acc (rebuild (hash-ref prev cur #f) (cons cur acc))))) (define colors (grid-colors g 0)) (define order (append (list 2) (sort (filter (lambda (v) (and (>= v 4) (<= v 7))) colors) <) (list 3))) (for/fold ((out g)) ((i (in-range 0 (- (length order) 1)))) (let* ((a (first (find-color g (list-ref order i)))) (b (first (find-color g (list-ref order (+ i 1))))) (path (bfs-path g a b))) (for/fold ((acc out)) ((p (in-list path))) (if (= (at g (first p) (second p)) 0) (set-cell acc (first p) (second p) 7) acc))))))
Provenance
- Generator
- generators/df17e660cb8e/generator.py
- Notes and decisions
- generators/df17e660cb8e/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 42fc2f38250df387d6e41fed5910f973122fa6f24e4c65bb1a8c188c7780f1dd
- Rule hash
- 966f58dd55e6
- Sources
- bank:056856052daa
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate df17e660cb8e --count 1 --seed 20261108 --test 1