← c2f4b540f2fb · c3052979ff96 →

c2fb0e01a539

Preserve the input grid and fill with color 7 every 4-connected zero region that cannot reach the outer border. Border-connected zeros stay 0; wall color, wall component identity, and hole shape do not matter.

enclosureflood fillinterior detection

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!
  (let* ((zero-mask (grid-from-fn (rows g) (cols g)
                      (lambda (r c) (if (= (at g r c) 0) 1 0))))
         (zero-objs (objects zero-mask 0)))
    (for/fold ([out g]) ([obj (in-list zero-objs)])
      (if (empty? (filter (lambda (p)
                            (or (= (first p) 0) (= (second p) 0)
                                (= (first p) (- (rows g) 1))
                                (= (second p) (- (cols g) 1))))
                          (obj-cells obj)))
          (paint-cells out (obj-cells obj) 7)
          out))))

Provenance

Generator
generators/c2fb0e01a539/generator.py
Notes and decisions
generators/c2fb0e01a539/notes.md
Review label
reviewed_safe
Generator SHA-256
8f0cc0ed324b7947445743158f85b3cfb01e615513bb29f715eb790921562ede
Rule hash
8efc6e86f888
Sources
bank:f2c80d62966a
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate c2fb0e01a539 --count 1 --seed 20261108 --test 1