← e6cf1120a17d · e73c86cb45ad →

e706449ebf4c

Paint cyan doubled-coordinate Manhattan auras around red bars, using each bar's bounding-box length as the threshold.

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* ((hh (rows g)) (ww (cols g)) (visited (make-hash)) (bars (list)) (result (make-hash))) (for* ((r (range 0 hh)) (c (range 0 ww))) (hash-set! result (list r c) (at g r c))) (for* ((r (range 0 hh)) (c (range 0 ww))) (when (and (= (at g r c) 2) (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 hh) (< cc 0) (>= cc ww) (!= (at g cr cc) 2)) (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)))))))))) (set! bars (append bars (list cells)))))) (for ((bar bars)) (let* ((rmin (min-of first bar)) (rmax (max-of first bar)) (cmin (min-of second bar)) (cmax (max-of second bar)) (bar-len (max (+ 1 (- rmax rmin)) (+ 1 (- cmax cmin)))) (radius bar-len) (cr2 (+ rmin rmax)) (cc2 (+ cmin cmax))) (for* ((r (range 0 hh)) (c (range 0 ww))) (let ((dist2 (+ (abs (- (* 2 r) cr2)) (abs (- (* 2 c) cc2))))) (when (and (<= dist2 radius) (zero? (hash-ref result (list r c) 0))) (hash-set! result (list r c) 8)))))) (build-grid hh ww (r c) (hash-ref result (list r c) 0))))))

Provenance

Generator
generators/e706449ebf4c/generator.py
Notes and decisions
generators/e706449ebf4c/notes.md
Review label
reviewed_safe
Generator SHA-256
1f13d3755c0fcf003cdcd6f8df54123dff8da0d2b671b027890d6e318b6a036b
Rule hash
665e4af22561
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e706449ebf4c --count 1 --seed 20261108 --test 1