← 0a9ee3cbb232 · 0ab5dc1f5386 →

0ab4fcb302d2

A 3x3 mini-grid has one empty row and column; the red marker's position in the remaining 2x2 code selects main- versus anti-diagonal 4x4 blocks.

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))
                (zero-row (first (filter (lambda (r)
                                           (all? (lambda (c) (zero? (at g r c)))
                                                 (range 0 w)))
                                         (range 0 h))))
                (zero-col (first (filter (lambda (c)
                                           (all? (lambda (r) (zero? (at g r c)))
                                                 (range 0 h)))
                                         (range 0 w))))
                (p2 (first (find-color g 2)))
                (r2 (fst p2))
                (c2 (snd p2))
                (color (first (filter (lambda (v) (and (!= v 0) (!= v 2)))
                                      (flatmap (lambda (r)
                                                 (map (lambda (c) (at g r c))
                                                      (range 0 w)))
                                               (range 0 h)))))
                (non-gap-rows (filter (lambda (r) (!= r zero-row)) (range 0 h)))
                (non-gap-cols (filter (lambda (c) (!= c zero-col)) (range 0 w)))
                (local-r (if (= r2 (first non-gap-rows)) 0 1))
                (local-c (if (= c2 (first non-gap-cols)) 0 1))
                (main-diag (= local-r local-c))
                (gap-r (* zero-row 4))
                (gap-c (* zero-col 4))
                (top-r (if (zero? gap-r) 1 0))
                (bot-r (if (= gap-r 8) 4 5))
                (left-c (if (zero? gap-c) 1 0))
                (right-c (if (= gap-c 8) 4 5))
                (blocks (if main-diag
                            (list (list top-r left-c) (list bot-r right-c))
                            (list (list top-r right-c) (list bot-r left-c)))))
           (grid-from-fn 9
                         9
                         (lambda (r c)
                           (if (for/or ((b blocks))
                                       (let* ((br (first b))
                                              (bc (first (rest b))))
                                         (and
                                           (>= r br)
                                           (< r (+ br 4))
                                           (>= c bc)
                                           (< c (+ bc 4)))))
                               color
                               0))))))

Provenance

Generator
generators/0ab4fcb302d2/generator.py
Notes and decisions
generators/0ab4fcb302d2/notes.md
Review label
reviewed_safe
Generator SHA-256
c5fc561ed3181e490cedee7e7e06c981021d0af7f589b6cc68a732799b97ef0c
Rule hash
39724c7d06e2
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 0ab4fcb302d2 --count 1 --seed 20261108 --test 1