← 7eaf2d73ca39 · 7ef325b21961 →

7eba3ddf13bd

Sparse walled mazes with 1-2 exact-count portal pairs, multi-hop routes, shorter non-portal alternatives, and three-occurrence non-portal decoys.

mazepathfindingportals

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 (portal-other p) (let* ((v (at g (first p) (second p))) (pts (if (>= v 4) (find-color g v) (list)))) (if (= (length pts) 2) (if (equal? p (first pts)) (second pts) (first pts)) p))) (define start (first (find-color g 2))) (define goal (first (find-color g 3))) (define prev (make-hash)) (define stepped (make-hash)) (define queue (list start)) (hash-set! prev start #f) (hash-set! stepped start #f) (define (bfs) (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))) (when (and (in-bounds? nr nc (rows g) (cols g)) (not (= (at g nr nc) 1))) (define step (list nr nc)) (define nxt (portal-other step)) (unless (hash-has-key? prev nxt) (hash-set! prev nxt cur) (hash-set! stepped nxt step) (set! queue (append queue (list nxt)))))) (bfs))) (bfs) (if (not (hash-has-key? prev goal)) g (let rebuild ((cur goal) (cells (list start goal))) (if (equal? cur start) (for/fold ((out g)) ((p (in-list cells))) (if (= (at out (first p) (second p)) 0) (set-cell out (first p) (second p) 8) out)) (rebuild (hash-ref prev cur #f) (cons (hash-ref stepped cur #f) cells)))))))

Provenance

Generator
generators/7eba3ddf13bd/generator.py
Notes and decisions
generators/7eba3ddf13bd/notes.md
Review label
reviewed_safe
Generator SHA-256
5ce1865b3bce007f9510fee7a6a12c33857940280f827cd347627ae99a9d5c6b
Rule hash
f97ce42855bc
Sources
bank:5dfff1627b31
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 7eba3ddf13bd --count 1 --seed 20261108 --test 1