← b8cd4b7fd7a4 · b8e2a07c1b6c →
b8d6fabb411e
Find the one solid color-3 square. For every nonzero/non-3 singleton marker lying left/right on a square row, or above/below on a square column, paint the zero-cell gap to the nearest square edge in that marker's color. Preserve the square, the markers, and all diagonal decoy markers.
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))
;; Find the 3-square
(threes (find-color g 3))
;; Top edge of the threes bbox
(tr1 (apply min (map first threes)))
;; Left edge of the threes bbox
(tc1 (apply min (map second threes)))
;; Bottom edge of the threes bbox
(tr2 (apply max (map first threes)))
;; Right edge of the threes bbox
(tc2 (apply max (map second threes)))
;; Find colored pixels (non-0, non-3)
(pixels (for*/list ((r (range 0 h)) (c (range 0 w))
#:when (let ((v (cell-at g r c)))
(and (not (= v 0)) (not (= v 3)))))
(list r c (cell-at g r c))))
;; Mutable lookup table for result
(result (make-hash)))
;; Copy grid
(for* ((r (range 0 h)) (c (range 0 w)))
(hash-set! result (list r c) (cell-at g r c)))
;; For each pixel, check if axis-aligned with 3-square
(for ((px pixels))
(let ((pr (first px)) (pc (second px)) (pcolor (third px)))
;; Same row as top or bottom of square?
(cond
;; Pixel on same row as square, to the right
((and (>= pr tr1) (<= pr tr2) (> pc tc2))
(for ((c (range (+ tc2 1) pc)))
(hash-set! result (list pr c) pcolor)))
;; To the left
((and (>= pr tr1) (<= pr tr2) (< pc tc1))
(for ((c (range (+ pc 1) tc1)))
(hash-set! result (list pr c) pcolor)))
;; Same col as square, below
((and (>= pc tc1) (<= pc tc2) (> pr tr2))
(for ((r (range (+ tr2 1) pr)))
(hash-set! result (list r pc) pcolor)))
;; Above
((and (>= pc tc1) (<= pc tc2) (< pr tr1))
(for ((r (range (+ pr 1) tr1)))
(hash-set! result (list r pc) pcolor))))))
(grid-from-fn h w
(lambda (r c)
(hash-ref result (list r c) 0))))))Provenance
- Generator
- generators/b8d6fabb411e/generator.py
- Notes and decisions
- generators/b8d6fabb411e/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 163223f3a00fcc859611b64df8b7d89c41cfa8dd29375b013db65e4b467e811d
- Rule hash
- e88f12aefcff
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate b8d6fabb411e --count 1 --seed 20261108 --test 1