← 9e47b59d6afc · 9e7fcd5605d8 →

9e6e338d0ca7

Fill each gray-wall chamber containing exactly one colored seed; leave zero- and multi-seed chambers unchanged.

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 ((seen (make-hash))
        (out g))
    (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))
        (define queue (list (cons r c)))
        (define chamber (list))
        (hash-set! seen (first queue) #t)
        (let bfs ([step 0])
          (unless (empty? queue)
            (let ((cur (first queue)))
              (set! queue (rest queue))
              (set! chamber (cons (list (car cur) (cdr cur)) chamber))
              (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)))
                    (hash-set! seen (cons nr nc) #t)
                    (set! queue (append queue (list (cons nr nc))))))))
            (bfs (+ step 1))))
        (let ((seeds (filter (lambda (p) (let ((v (at g (first p) (second p)))) (and (>= v 1) (<= v 4)))) chamber)))
          (when (= (length seeds) 1)
            (let ((color (at g (first (first seeds)) (second (first seeds)))))
              (for ([p (in-list chamber)])
                (when (= (at out (first p) (second p)) 0)
                  (set! out (set-cell out (first p) (second p) color)))))))))
    out))

Provenance

Generator
generators/9e6e338d0ca7/generator.py
Notes and decisions
generators/9e6e338d0ca7/notes.md
Review label
reviewed_safe
Generator SHA-256
207607de7e991132cbba593495a9ffbf935d61feada8fe404d2f662cf865b063
Rule hash
81c0076a1d08
Sources
bank:0d41ded5f4cd
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 9e6e338d0ca7 --count 1 --seed 20261108 --test 1