← 4ca8a7b38652 · 4cfd24806fb2 →

4cea2727fcf9

A 0-background maze with exactly one color-1 start, color-2 goal and color-3 checkpoint, optional paired color-4 portals, and color-8 walls. Find the shortest 4-neighbor route from start to goal that visits the checkpoint; portals teleport in one step. Paint traversed background cells color 7. Portal-present generated examples are required to make teleportation causally change the label.

parametric familycheckpointspathfindingportals

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 start (first (find-color g 1))) (define goal (first (find-color g 2))) (define check (first (find-color g 3))) (define portals (find-color g 4)) (define (portal-exit p) (if (member? p portals) (let ((others (filter (lambda (q) (not (equal? q p))) portals))) (if (empty? others) p (first others))) p)) (define start-state (list (first start) (second start) (equal? start check))) (define queue (list start-state)) (define prev (make-hash)) (define end-state #f) (hash-set! prev start-state #f) (define (search) (unless (or end-state (empty? queue)) (define st (first queue)) (set! queue (rest queue)) (define r (first st)) (define c (second st)) (define got (third st)) (if (and (equal? (list r c) goal) got) (set! end-state st) (for ((d (in-list cardinal-deltas))) (define nr (+ r (first d))) (define nc (+ c (second d))) (when (and (in-bounds? nr nc (rows g) (cols g)) (not (= (at g nr nc) 8))) (define p2 (portal-exit (list nr nc))) (define ns (list (first p2) (second p2) (or got (= (at g nr nc) 3)))) (when (not (hash-has-key? prev ns)) (hash-set! prev ns st) (set! queue (append queue (list ns))))))) (search))) (search) (let ((path (let rebuild ((cur end-state) (acc (list))) (if (eq? cur #f) acc (rebuild (hash-ref prev cur #f) (cons cur acc)))))) (for/fold ((out g)) ((st (in-list path))) (let ((r (first st)) (c (second st))) (if (= (at out r c) 0) (set-cell out r c 7) out))))))

Provenance

Generator
generators/4cea2727fcf9/generator.py
Notes and decisions
generators/4cea2727fcf9/notes.md
Review label
reviewed_safe
Generator SHA-256
8dbaaa454153ac75eba6a7570afca498879b703d67896fbe3480283693bb698a
Rule hash
fbb3bae580b8
Sources
bank:f49e478ddaeb
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 4cea2727fcf9 --count 1 --seed 20261108 --test 1