← a6294f07bff6 · a76216bfa3e8 →
a631936f7715
Magenta components recolored by adjacent label cells; labels removed.
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! (lambda (g)
(let* ((h (rows g))
(w (cols g)))
(let* ((bg 7)
(visited (make-hash))
(result (make-hash)))
(for* ((r (range 0 h)) (c (range 0 w))) (hash-set! result (list r c) bg))
(for* ((r (range 0 h)) (c (range 0 w)))
(when
(and (= (at g r c) 6) (not (hash-has-key? visited (list r c))))
(let ((cells (list)))
(let bfs
((q (list (list r c))))
(unless
(null? q)
(let ((cr (first (car q)))
(cc (second (car q))))
(cond
((or
(hash-has-key? visited (list cr cc))
(< cr 0)
(>= cr h)
(< cc 0)
(>= cc w)
(!= (at g cr cc) 6)) (bfs (cdr q)))
(else (hash-set! visited (list cr cc) #t)
(set! cells (cons (list cr cc) cells))
(bfs (append (cdr q)
(list (list (- cr 1) cc)
(list (+ cr 1) cc)
(list cr (- cc 1))
(list cr (+ cc 1))))))))))
(let ((label 6))
(for ((cell cells))
(for ((d (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))))
(let ((nr (+ (first cell) (first d)))
(nc (+ (second cell) (second d))))
(when
(and
(>= nr 0)
(< nr h)
(>= nc 0)
(< nc w)
(!= (at g nr nc) bg)
(!= (at g nr nc) 6))
(set! label (at g nr nc))))))
(for ((cell cells)) (hash-set! result cell label))))))
(cellmap g (r c v) (hash-ref result (list r c) 0))))))Provenance
- Generator
- generators/a631936f7715/generator.py
- Notes and decisions
- generators/a631936f7715/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 965a662deb1bad237758745f2b18ad53eda6f8d0bf3c8d3d4febaa74b1e18d30
- Rule hash
- 8097fabedcc2
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate a631936f7715 --count 1 --seed 20261108 --test 1