← d78409c82698 · d7c15b2e56ec →

d7b84df5a06a

A 0-background grid is split into four rectangular chambers by one full horizontal and one full vertical color-5 wall. Each chamber contains sparse 2/3/4 seeds. Preserve walls and seeds; fill only zeros with 6/7/8 for the chamber-local unique plurality of 2/3/4, or 9 when the largest count is tied. Every normal draw includes all winner mappings, a tie, and a plurality-without-majority counterexample.

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 ((dummy 0))
    (define (passable? r c v) (not (= v 5)))
    ;; Mutable lookup table for seen
    (define seen (make-hash))
    (define comps (list))
    (for ([p (in-list (grid-positions g))])
      (let ((r (first p)) (c (second p)))
        (when (and (not (hash-has-key? seen p)) (passable? r c (at g r c)))
          (let ((comp (connected-region g r c passable?)))
            (for ([q (in-list comp)]) (hash-set! seen q #t))
            (set! comps (cons comp comps))))))
    (define (mapped color) (cond [(= color 2) 6] [(= color 3) 7] [else 8]))
    (define (winner comp)
      (let* ((counts (map (lambda (color)
                            (list color (count-where (lambda (p) (= (at g (first p) (second p)) color)) comp)))
                          (list 2 3 4)))
             (sorted (sort counts (lambda (a b) (> (second a) (second b))))))
        (if (= (second (first sorted)) 0)
            #f
            (if (and (> (length sorted) 1) (= (second (first sorted)) (second (second sorted))))
                9
                (mapped (first (first sorted)))))))
    (foldl (lambda (comp out)
             (let ((fill (winner comp)))
               (if fill
                   (foldl (lambda (p acc)
                            (if (= (at g (first p) (second p)) 0)
                                (set-cell acc (first p) (second p) fill)
                                acc))
                          out comp)
                   out)))
           g comps)))

Provenance

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