← 4f09f8bfa35a · 4f6f232c17bc →

4f1ec6a61342

Color-5 walls enclose 2..6 rectangular chambers. The top-left value 1..6 selects the unique chamber containing exactly that many color-2 cells. The reference fills that chamber with 8 and erases other seeds; walls remain 5. The control becomes 0 except that control 5 remains 5. Canonical crosses alternate with count-disambiguating default inputs.

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!
  (let ((target-count (at g 0 0))
        (seen (make-hash)))
    (define out (grid-from-fn (rows g) (cols g) (lambda (r c) (if (= (at g r c) 5) 5 0))))
    (for* ([r (in-range (rows g))] [c (in-range (cols g))])
      (unless (or (hash-has-key? seen (cons r c)) (= (at g r c) 5) (and (= r 0) (= c 0)))
        (hash-set! seen (cons r c) #t)
        (when (or (= (at g r c) 0) (= (at g r c) 2))
          (define queue (list (cons r c)))
          (define cells (list))
          (define seeds 0)
          (let bfs ([step 0])
            (unless (empty? queue)
              (let ((cur (first queue)))
                (set! queue (rest queue))
                (set! cells (cons (list (car cur) (cdr cur)) cells))
                (when (= (at g (car cur) (cdr cur)) 2) (set! seeds (+ seeds 1)))
                (for ([d (in-list cardinal-deltas)])
                  (let ((nr (+ (car cur) (first d)))
                        (nc (+ (cdr cur) (second d))))
                    (when (and (in-bounds? nr nc (rows g) (cols g))
                               (not (hash-has-key? seen (cons nr nc)))
                               (not (= (at g nr nc) 5))
                               (not (and (= nr 0) (= nc 0))))
                      (hash-set! seen (cons nr nc) #t)
                      (set! queue (append queue (list (cons nr nc))))))))
              (bfs (+ step 1))))
          (when (= seeds target-count)
            (set! out (paint-cells out cells 8))))))
    out))

Provenance

Generator
generators/4f1ec6a61342/generator.py
Notes and decisions
generators/4f1ec6a61342/notes.md
Review label
reviewed_safe
Generator SHA-256
439090ba19392e993a0168533970d9da82e6cf6117e505292f907a1a82dabb34
Rule hash
f73a1c6442ab
Sources
bank:4e772fa039b8
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 4f1ec6a61342 --count 1 --seed 20261108 --test 1