← 28b87bd4c441 · 28c998e193d9 →
28ba67946524
One blue component seeds a four-neighbor contact graph. Alternate varied paths with branched four-cycles and a seed-adjacent triangle; mark all components at shortest graph distance exactly two cyan on a blank canvas. Nonseed colors, including 8, can repeat in disconnected objects. Racket alone supplies labels.
BFS on contact graphdistance filteringseeded selection
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 (distances grid objs seed) (let ((dist (make-hash)) (queue (list seed))) (hash-set! dist seed 0) (define (bfs) (unless (empty? queue) (let ((i (first queue))) (set! queue (rest queue)) (for ((j (in-list (neighbors grid objs i)))) (when (not (hash-has-key? dist j)) (hash-set! dist j (+ (hash-ref dist i) 1)) (set! queue (append queue (list j))))) (bfs)))) (bfs) dist)) (define objs (objects g 0)) (define seed (first (filter (lambda (i) (= (obj-color (list-ref objs i)) 1)) (range 0 (length objs))))) (define dist (distances g objs seed)) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((i (in-range (length objs)))) (if (and (hash-has-key? dist i) (= (hash-ref dist i) 2)) (paint-cells out (obj-cells (list-ref objs i)) 8) out))))
Provenance
- Generator
- generators/28ba67946524/generator.py
- Notes and decisions
- generators/28ba67946524/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 02f04089533abeaf000d8492f2b9d783cbb016e5e6553694f1ad96d3f68d62a0
- Rule hash
- 88eede4e9a69
- Sources
- bank:3a1815be7c2e
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 28ba67946524 --count 1 --seed 20261108 --test 1