← 6058ff1ae20c · 60a8a9d74a75 →
6098a755202d
An inset rectangular colour-5 frame contains two or three single-cell seeds. Fill each zero inside the frame with the colour among the nearest Manhattan-distance seeds when that nearest colour is unique. A tie between different colours stays 0; equally near seeds of the same colour still fill with that colour. Three scheduled profiles cover two distinct seeds, three distinct seeds, and the decisive repeated-colour tie case.
Manhattan distanceregion coloringties to background
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).
Reference rule (Racket)
(rule!
(let* ((frame-bb (bbox-of-cells (find-color g 5)))
(seeds (filter (lambda (cell) (and (not (= (third cell) 0)) (not (= (third cell) 5))))
(grid-cells g))))
(define (dist cell r c)
(+ (abs (- r (first cell))) (abs (- c (second cell)))))
(define (fill-value r c)
(let* ((dmin (apply min (map (lambda (cell) (dist cell r c)) seeds)))
(colors (remove-duplicates (map third (filter (lambda (cell) (= (dist cell r c) dmin)) seeds)))))
(if (= (length colors) 1) (first colors) 0)))
(for*/fold ([out g])
([r (in-range (+ (first frame-bb) 1) (third frame-bb))]
[c (in-range (+ (second frame-bb) 1) (fourth frame-bb))])
(if (= (at out r c) 0) (set-cell out r c (fill-value r c)) out))))Provenance
- Generator
- generators/6098a755202d/generator.py
- Notes and decisions
- generators/6098a755202d/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f37f4f1a4a4ae60d2dccf0775041ab0b58d20c099b3fcfb494c8a0992df19a9e
- Rule hash
- 5ede5108ff10
- Sources
- bank:9a66c53abf7f
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 6098a755202d --count 1 --seed 20261108 --test 1