← 627260bf308f · 628b4a2c24c1 →

62757098b2dd

For each solid gray(5) rectangle, read the four distinct colored markers one cell diagonally outside its bounding-box corners. Erase those markers and fill the rectangle's four local quadrants with the top-left, top-right, bottom-left, and bottom-right marker colors. Process every rectangle independently; for odd dimensions the extra row or column belongs to the bottom or right half.

parametric family

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 all gray (5) connected components using objects
         (objs (objects (grid-from-fn h w (lambda (r c) (if (= (cell-at g r c) 5) 5 0))) 0))
         (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)))
    ;; Process each gray rectangle
    (for ((obj objs))
      (let* ((cells (obj-cells obj))
             (rs (map first cells)) (cs (map second cells))
             (fr1 (apply min rs)) (fc1 (apply min cs))
             (fr2 (apply max rs)) (fc2 (apply max cs))
             (fh (+ 1 (- fr2 fr1)))
             (fw (+ 1 (- fc2 fc1)))
             (tl (cell-at g (- fr1 1) (- fc1 1)))
             (tr (cell-at g (- fr1 1) (+ fc2 1)))
             (bl (cell-at g (+ fr2 1) (- fc1 1)))
             (br (cell-at g (+ fr2 1) (+ fc2 1)))
             (mid-r (+ fr1 (quotient fh 2)))
             (mid-c (+ fc1 (quotient fw 2))))
        ;; Remove corner markers
        (hash-set! result (list (- fr1 1) (- fc1 1)) 0)
        (hash-set! result (list (- fr1 1) (+ fc2 1)) 0)
        (hash-set! result (list (+ fr2 1) (- fc1 1)) 0)
        (hash-set! result (list (+ fr2 1) (+ fc2 1)) 0)
        ;; Fill quadrants
        (for* ((r (range fr1 (+ fr2 1))) (c (range fc1 (+ fc2 1))))
          (hash-set! result (list r c)
            (cond
              ((and (< r mid-r) (< c mid-c)) tl)
              ((and (< r mid-r) (>= c mid-c)) tr)
              ((and (>= r mid-r) (< c mid-c)) bl)
              (else br))))))
    (grid-from-fn h w
      (lambda (r c)
        (hash-ref result (list r c) 0))))))

Provenance

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