← f7672a367745 · f7b828a70061 →

f7a512650552

Two full color-5 columns form source, worked-result, and query panels. Infer row-span versus column-span closure from the first two panels, apply that closure to the query object, crop it, and recolor it orange (8).

analogymeta-transform detectionpanel reasoning

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 (top-left< a b) (if (= (obj-r1 a) (obj-r1 b)) (< (obj-c1 a) (obj-c1 b)) (< (obj-r1 a) (obj-r1 b)))) (define (row-profile obj) (for/list ((r (in-range (obj-r1 obj) (+ (obj-r2 obj) 1)))) (count-where (lambda (p) (= (first p) r)) (obj-cells obj)))) (define (col-profile obj) (for/list ((c (in-range (obj-c1 obj) (+ (obj-c2 obj) 1)))) (count-where (lambda (p) (= (second p) c)) (obj-cells obj)))) (define (max-row-peak obj) (apply max (row-profile obj))) (define (max-col-peak obj) (apply max (col-profile obj))) (define (crop-component obj (color 8)) (let ((cells (map (lambda (p) (list (- (first p) (obj-r1 obj)) (- (second p) (obj-c1 obj)))) (obj-cells obj)))) (paint-cells (empty-grid (obj-h obj) (obj-w obj) 0) cells color))) (define (row-span-cells obj) (remove-duplicates (flatmap (lambda (r) (let ((cols (map second (filter (lambda (p) (= (first p) r)) (obj-cells obj))))) (if (empty? cols) (list) (for/list ((c (in-range (apply min cols) (+ (apply max cols) 1)))) (list r c))))) (range (obj-r1 obj) (+ (obj-r2 obj) 1))))) (define (col-span-cells obj) (remove-duplicates (flatmap (lambda (c) (let ((rs (map first (filter (lambda (p) (= (second p) c)) (obj-cells obj))))) (if (empty? rs) (list) (for/list ((r (in-range (apply min rs) (+ (apply max rs) 1)))) (list r c))))) (range (obj-c1 obj) (+ (obj-c2 obj) 1))))) (define (row-fill grid banned) (for/fold ((out grid)) ((obj (in-list (objects grid 0)))) (if (member (obj-color obj) banned) out (paint-cells out (row-span-cells obj) (obj-color obj))))) (define (col-fill grid banned) (for/fold ((out grid)) ((obj (in-list (objects grid 0)))) (if (member (obj-color obj) banned) out (paint-cells out (col-span-cells obj) (obj-color obj))))) (define (split-vertical-panels grid sep-color) (define sep-cols (filter (lambda (c) (all? (lambda (r) (= (at grid r c) sep-color)) (range 0 (rows grid)))) (range 0 (cols grid)))) (define bounds (append (list -1) sep-cols (list (cols grid)))) (let loop ((xs bounds)) (if (empty? (rest xs)) (list) (let* ((left (+ (first xs) 1)) (right (- (second xs) 1)) (tail (loop (rest xs)))) (if (<= left right) (cons (subgrid grid 0 left (- (rows grid) 1) right) tail) tail))))) (define (single-largest grid (banned (list))) (first (sort (filter (lambda (obj) (not (member (obj-color obj) banned))) (objects grid 0)) (lambda (a b) (cond ((not (= (obj-size a) (obj-size b))) (> (obj-size a) (obj-size b))) ((not (= (max-row-peak a) (max-row-peak b))) (> (max-row-peak a) (max-row-peak b))) ((not (= (max-col-peak a) (max-col-peak b))) (> (max-col-peak a) (max-col-peak b))) (else (top-left< a b))))))) (define panels (split-vertical-panels g 5)) (define transformed (if (equal? (row-fill (first panels) (list)) (second panels)) (row-fill (third panels) (list)) (col-fill (third panels) (list)))) (crop-component (single-largest transformed) 8)))

Provenance

Generator
generators/f7a512650552/generator.py
Notes and decisions
generators/f7a512650552/notes.md
Review label
reviewed_safe
Generator SHA-256
321f6c97ac908411af57a794f5c0e336ee5a79858e5191ebf646aab37e0a0205
Rule hash
25622d47ca31
Sources
bank:fe9bb13a9b18
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate f7a512650552 --count 1 --seed 20261108 --test 1