← 3f93d8860778 · 3ffc7ef20035 →

3fb5ef8ad60e

Large 8-rect with 2-3 small colored 2x2 blocks in distinct quadrants.

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))
                (positions (flatmap (lambda (r)
                                      (map (lambda (c) (cons r c)) (range 0 w)))
                                    (range 0 h))))
           (define (block-color? v) (and (!= v 0) (!= v 8)))
           (define cells
             (filter (lambda (p) (block-color? (at g (fst p) (snd p)))) positions))
           (define colors (unique (map (lambda (p) (at g (fst p) (snd p))) cells)))
           (define (center color)
             (let* ((pts (filter (lambda (p) (= (at g (fst p) (snd p)) color)) cells))
                    (n (length pts)))
               (list color
                     (/ (for/sum ((p pts)) (fst p)) n)
                     (/ (for/sum ((p pts)) (snd p)) n))))
           (define blocks (map center colors))
           (define rows* (sort-by (map second blocks) (lambda (x) x)))
           (define cols* (sort-by (map third blocks) (lambda (x) x)))
           (define mid-r (/ (+ (first rows*) (last rows*)) 2))
           (define mid-c (/ (+ (first cols*) (last cols*)) 2))
           (define (quadrant v mid) (if (<= v mid) 0 1))
           (reduce (lambda (out block)
                     (set-cell out
                               (quadrant (second block) mid-r)
                               (quadrant (third block) mid-c)
                               (first block)))
                   (list (list 0 0) (list 0 0))
                   blocks))))

Provenance

Generator
generators/3fb5ef8ad60e/generator.py
Notes and decisions
generators/3fb5ef8ad60e/notes.md
Review label
reviewed_safe
Generator SHA-256
d61b6c8db19431df62cee636fded91487b5100f88f32abc56aa571434c4cffed
Rule hash
70a98c47dfad
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 3fb5ef8ad60e --count 1 --seed 20261108 --test 1