← 382eb0e592eb · 394fc1eaa85e →

38300735cc4d

Find every nonzero color occurring exactly twice. If its two cells are row- or column-aligned and the strict interior is all 0, fill the whole inclusive segment with that color. Blocked pairs, nonaligned pairs, and colors occurring three times stay unchanged. Generated five-sample windows contain horizontal and vertical bridges, singleton- and repeated-color blockers, and explicit wrong-count and nonalignment counterexamples.

endpoint pairingpath fillrow/column alignment

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!
  (let ((paths
          (flatmap
            (lambda (color)
              (let ((cells (find-color g color)))
                (if (= (length cells) 2)
                    (let* ((a (first cells))
                           (b (second cells))
                           (r1 (fst a))
                           (c1 (snd a))
                           (r2 (fst b))
                           (c2 (snd b)))
                      (cond
                        [(= r1 r2)
                         (let ((cmin (min c1 c2))
                               (cmax (max c1 c2)))
                           (if (all?
                                 (lambda (c)
                                   (or (= (cell-at g r1 c) 0)
                                       (= c c1)
                                       (= c c2)))
                                 (range cmin (+ cmax 1)))
                               (map (lambda (c) (list r1 c color)) (range cmin (+ cmax 1)))
                               (list)))]
                        [(= c1 c2)
                         (let ((rmin (min r1 r2))
                               (rmax (max r1 r2)))
                           (if (all?
                                 (lambda (r)
                                   (or (= (cell-at g r c1) 0)
                                       (= r r1)
                                       (= r r2)))
                                 (range rmin (+ rmax 1)))
                               (map (lambda (r) (list r c1 color)) (range rmin (+ rmax 1)))
                               (list)))]
                        [else (list)]))
                    (list))))
            (grid-colors g 0))))
    (paint-cells g paths)))

Provenance

Generator
generators/38300735cc4d/generator.py
Notes and decisions
generators/38300735cc4d/notes.md
Review label
reviewed_safe
Generator SHA-256
a480b37973c7a23292633507fa894c5aa6d4efb89c4ab6e4ed71bb0f4394f019
Rule hash
e1f30dfc7d44
Sources
bank:e352836528da
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 38300735cc4d --count 1 --seed 20261108 --test 1