← b5af3d6b3cd5 · b5c887448ed9 →

b5b012cd97d9

Choose the most frequent nonzero color as background. Count every other color; turn the largest repeated count and the next repeated count into solid squares whose side lengths are their integer square roots, and preserve an optional singleton. Place the big square at the upper right, the smaller square at the lower left, and—when present—the singleton at the bottom-left corner.

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! (lambda (g)
         (let* ((h (rows g))
                (w (cols g)))
           (let* ((bg (mode g))
                  (colors (grid-colors g bg))
                  (entries (map (lambda (color)
                                  (list (length (find-color g color)) color))
                                colors))
                  (sorted (sort entries > #:key first))
                  (big (first sorted))
                  (big-n (first big))
                  (big-color (second big))
                  (repeated (filter (lambda (entry) (> (first entry) 1)) (rest sorted)))
                  (small (if (empty? repeated) #f (first repeated)))
                  (small-n (if small (first small) 0))
                  (small-color (if small (second small) bg))
                  (single (find-first (lambda (entry) (= (first entry) 1)) entries))
                  (single-color (if single (second single) bg))
                  (square-side (lambda (n)
                                 (find-first (lambda (i) (= (* i i) n))
                                             (range 1 (+ n 1)))))
                  (big-side (square-side big-n))
                  (small-side (if small (square-side small-n) 0))
                  (out-h (max big-side (+ small-side (if single 1 0))))
                  (small-c (if single 2 0))
                  (big-c (+ small-c small-side 1))
                  (out-w (+ big-c big-side))
                  (small-r (- out-h small-side)))
             (build-grid out-h
                         out-w
                         (r c)
                         (cond
                           ((and (< r big-side) (>= c big-c) (< c (+ big-c big-side))) big-color)
                           ((and
                              small
                              (>= r small-r)
                              (>= c small-c)
                              (< c (+ small-c small-side))) small-color)
                           ((and single (= r (- out-h 1)) (zero? c)) single-color)
                           (else bg)))))))

Provenance

Generator
generators/b5b012cd97d9/generator.py
Notes and decisions
generators/b5b012cd97d9/notes.md
Review label
reviewed_safe
Generator SHA-256
cb0dabef3b59ad6f4a1f86cd8c03956f1764925c82094007746356f2e85687ff
Rule hash
8dee168c2b2a
Sources
augmented, training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate b5b012cd97d9 --count 1 --seed 20261108 --test 1