← 954070a7d7ce · 956425dc719c →

95524d104174

A zero-background grid contains one full-height vertical line and one full-width horizontal line in distinct nonzero colors. Either line may win at their interior intersection. Paint all eight surrounding cells yellow (4), overwriting both background and line arms; preserve the intersection and every cell outside its 3x3 neighborhood. Sample square and rectangular grids, margin-one crossings, all line colors, and both overlap winners.

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)))
           (let* ((vert-col (find-first (lambda (c)
                                          (let* ((vals (map (lambda (r) (at g r c))
                                                            (range 0 h)))
                                                 (nz (filter (lambda (v) (!= v 0)) vals)))
                                            (for/or ((v nz))
                                                    (>= (count-if (lambda (x) (= x v))
                                                                  vals)
                                                        (- h 1)))))
                                        (range 0 w)))
                  (vert-color (first (sort-by (unique (filter (lambda (v) (!= v 0))
                                                              (map (lambda (r)
                                                                     (at g r vert-col))
                                                                   (range 0 h))))
                                              (lambda (v)
                                                (* -1
                                                   (count-if (lambda (x) (= x v))
                                                             (map (lambda (r)
                                                                    (at g r vert-col))
                                                                  (range 0 h))))))))
                  (horiz-row (find-first (lambda (r)
                                           (let* ((vals (map (lambda (c) (at g r c))
                                                             (range 0 w)))
                                                  (nz (filter (lambda (v)
                                                                (and
                                                                  (!= v 0)
                                                                  (!= v vert-color)))
                                                              vals)))
                                             (and
                                               (> (length nz) 0)
                                               (for/or ((v nz))
                                                       (>= (count-if (lambda (x)
                                                                       (= x v))
                                                                     vals)
                                                           (- w 1))))))
                                         (range 0 h))))
             (cellmap g
                      (r c v)
                      (if (and
                            (<= (abs (- r horiz-row)) 1)
                            (<= (abs (- c vert-col)) 1)
                            (not (and (= r horiz-row) (= c vert-col))))
                          4
                          v))))))

Provenance

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