← 399643e39cf6 · 39ad03f74acb →

39abddf600eb

An inset rectangular frame contains exactly two colored seeds. Paint color 9 on every strict-interior cell equidistant from the seeds in Manhattan distance; opposite-parity seeds lawfully yield an unchanged input.

distance geometryequidistanceframe interior

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 ((dummy 0))
    (define (rect-border? obj)
      (let* ((bb (obj-bbox obj))
             (h (+ (- (third bb) (first bb)) 1))
             (w (+ (- (fourth bb) (second bb)) 1))
             (border-size (- (* h w) (* (max 0 (- h 2)) (max 0 (- w 2))))))
        (and (= (obj-size obj) border-size)
             (all? (lambda (p)
                     (or (= (first p) (first bb)) (= (first p) (third bb))
                         (= (second p) (second bb)) (= (second p) (fourth bb))))
                   (obj-cells obj)))))
    (let* ((frame (first (filter rect-border? (objects g 0))))
           (bb (obj-bbox frame))
           (fcolor (obj-color frame))
           (seeds (filter (lambda (cell)
                            (let ((r (first cell)) (c (second cell)) (v (third cell)))
                              (and (not (= v 0)) (not (= v fcolor))
                                   (not (= r 0)) (not (= c 0))
                                   (not (= r (- (rows g) 1))) (not (= c (- (cols g) 1))))))
                          (grid-cells g)))
           (a (first seeds))
           (b (second seeds))
           (with-seeds (paint-cells (paint-cells (empty-grid (rows g) (cols g) 0) (obj-cells frame) fcolor)
                                    (list a b))))
      (for*/fold ([out with-seeds])
                 ([r (in-range (+ (first bb) 1) (third bb))]
                  [c (in-range (+ (second bb) 1) (fourth bb))])
        (if (or (and (= r (first a)) (= c (second a)))
                (and (= r (first b)) (= c (second b))))
            out
            (if (= (+ (abs (- r (first a))) (abs (- c (second a))))
                   (+ (abs (- r (first b))) (abs (- c (second b)))))
                (set-cell out r c 9)
                out))))))

Provenance

Generator
generators/39abddf600eb/generator.py
Notes and decisions
generators/39abddf600eb/notes.md
Review label
reviewed_safe
Generator SHA-256
420745b489f4080dca7e147cbf5882155aa610d4231aee0cf6303bccff731a06
Rule hash
38c495fef5e9
Sources
bank:f3a2e93ae563
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 39abddf600eb --count 1 --seed 20261108 --test 1