← 9bfbec04496c · 9c26c4b2c305 →

9c0ccdf0d414

Three or four distinct-color connected motifs occupy distinct source quadrants. The rule classifies each motif by its centroid, crops it, and reassembles the occupied quadrants as a normalized 2x2 mosaic with one background row and column between mosaic cells.

normalizationquadrant_logicrelayout

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 mid-r (- (rows g) 1))
    (define mid-c (- (cols g) 1))
    (define (top? obj) (< (* 2 (apply + (obj-rs obj))) (* (obj-size obj) mid-r)))
    (define (left? obj) (< (* 2 (apply + (obj-cs obj))) (* (obj-size obj) mid-c)))
    (define (shape obj) (subgrid g (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj)))
    (define objs (objects g 0))
    (define tl (map shape (filter (lambda (obj) (and (top? obj) (left? obj))) objs)))
    (define tr (map shape (filter (lambda (obj) (and (top? obj) (not (left? obj)))) objs)))
    (define bl (map shape (filter (lambda (obj) (and (not (top? obj)) (left? obj))) objs)))
    (define br (map shape (filter (lambda (obj) (and (not (top? obj)) (not (left? obj)))) objs)))
    (define s-tl (if (empty? tl) #f (first tl)))
    (define s-tr (if (empty? tr) #f (first tr)))
    (define s-bl (if (empty? bl) #f (first bl)))
    (define s-br (if (empty? br) #f (first br)))
    (define top-h (max (if s-tl (rows s-tl) 1) (if s-tr (rows s-tr) 1)))
    (define bot-h (max (if s-bl (rows s-bl) 1) (if s-br (rows s-br) 1)))
    (define left-w (max (if s-tl (cols s-tl) 1) (if s-bl (cols s-bl) 1)))
    (define right-w (max (if s-tr (cols s-tr) 1) (if s-br (cols s-br) 1)))
    (define (paste-shape out shape top left)
      (if (not shape)
          out
          (for*/fold ([acc out])
                     ([r (in-range (rows shape))]
                      [c (in-range (cols shape))])
            (let ((v (at shape r c)))
              (if (not (= v 0)) (set-cell acc (+ top r) (+ left c) v) acc)))))
    (paste-shape
      (paste-shape
        (paste-shape
          (paste-shape (empty-grid (+ top-h 1 bot-h) (+ left-w 1 right-w) 0) s-tl 0 0)
          s-tr 0 (+ left-w 1))
        s-bl (+ top-h 1) 0)
      s-br (+ top-h 1) (+ left-w 1))))

Provenance

Generator
generators/9c0ccdf0d414/generator.py
Notes and decisions
generators/9c0ccdf0d414/notes.md
Review label
reviewed_safe
Generator SHA-256
affda74a065d4074e7a58218f46fee4c2c8627cb4fe691e4e23e654dd0489a81
Rule hash
559cd5677fd5
Sources
bank:ca0e5b777526
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 9c0ccdf0d414 --count 1 --seed 20261108 --test 1