← ada3abda1b1d · adcdcbe48f64 →

ada76e18c19c

On a black grid, inspect each row independently. If and only if the row contains exactly two nonzero cells and those two cells have the same color, fill every cell between them, inclusive, with that color. Leave mismatched pairs, rows with extra nonzero cells, and all other rows unchanged.

parametric familyrow-wise reasoningsame-sizesegment completion

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!
  (grid-from-fn (rows g) (cols g)
    (lambda (r c)
      (let* ((vals (filter (lambda (v) (not (= v 0))) (row-at g r)))
             (colors (remove-duplicates vals)))
        (if (and (= (length colors) 1) (= (length vals) 2))
            (let* ((color (first colors))
                   (cols (map second (filter (lambda (cell) (= (third cell) color))
                                             (for/list ([cc (in-range (cols g))])
                                               (list r cc (at g r cc)))))))
              (if (and (>= c (apply min cols)) (<= c (apply max cols))) color (at g r c)))
            (at g r c))))))

Provenance

Generator
generators/ada76e18c19c/generator.py
Notes and decisions
generators/ada76e18c19c/notes.md
Review label
reviewed_safe
Generator SHA-256
0fc03c3b4e7e07c5390a25d706b4595ae468fc8e4b4c376a1093dbf532044d4f
Rule hash
714e73d2362f
Sources
bank:dc02f6f7c147
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate ada76e18c19c --count 1 --seed 20261108 --test 1