← edf83166c155 · ee5295e1813b →
ee37b0acdd32
A zero-background tree of touching monochrome components has singleton blue(1) and red(2) endpoints, a unique 4..6-object route between them, and 1..2 attached dead-end branches. Paint every cell of the unique blue-to-red component path color 8 and erase all off-path components.
graph shortest pathmarker componentssame-size extraction
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 (adjacent? grid a b) (any? (lambda (p) (any? (lambda (d) (member (list (+ (first p) (first d)) (+ (second p) (second d))) (obj-cells b))) cardinal-deltas)) (obj-cells a))) (define (neighbors grid objs i) (filter (lambda (j) (and (not (= i j)) (adjacent? grid (list-ref objs i) (list-ref objs j)))) (range 0 (length objs)))) (define (union-cells objs ids) (apply append (map (lambda (i) (obj-cells (list-ref objs i))) ids))) (define (shortest-path grid objs src dst) (let ((prev (make-hash)) (queue (list src))) (hash-set! prev src #f) (define (bfs) (unless (or (empty? queue) (hash-has-key? prev dst)) (let ((i (first queue))) (set! queue (rest queue)) (for ((j (in-list (neighbors grid objs i)))) (when (not (hash-has-key? prev j)) (hash-set! prev j i) (set! queue (append queue (list j))))) (bfs)))) (bfs) (if (not (hash-has-key? prev dst)) (list) (let rebuild ((cur dst) (acc (list))) (if (eq? cur #f) acc (rebuild (hash-ref prev cur #f) (cons cur acc))))))) (define objs (objects g 0)) (define s (first (filter (lambda (i) (= (obj-color (list-ref objs i)) 1)) (range 0 (length objs))))) (define t (first (filter (lambda (i) (= (obj-color (list-ref objs i)) 2)) (range 0 (length objs))))) (define path (shortest-path g objs s t)) (paint-cells (empty-grid (rows g) (cols g) 0) (union-cells objs path) 8)))
Provenance
- Generator
- generators/ee37b0acdd32/generator.py
- Notes and decisions
- generators/ee37b0acdd32/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 1cf46183d36979212fc84956fecef9801427d54d7072f54559edf358a6953747
- Rule hash
- 5db437049d2b
- Sources
- bank:3a1815be7c2e
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate ee37b0acdd32 --count 1 --seed 20261108 --test 1