← a4fb12580b3f · a53fa114c4a9 →
a51a8e285ce9
Three equal panels, separated by full-height color-8 columns, contain two same-area prototype polyominoes and a differently colored query. Match the query to exactly one prototype under any rotation or reflection; output the displayed prototype support tightly cropped and recolored with the query color.
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! (let ((dummy 0)) (define (paint grid cells color) (for/fold ((out grid)) ((p (in-list cells))) (if (in-bounds? (first p) (second p) (rows out) (cols out)) (set-cell out (first p) (second p) color) out))) (define (binary-grid grid) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 1)))) (define (split-panels-row grid count) (let* ((panel-w (quotient (- (cols grid) (- count 1)) count))) (for/list ((i (in-range count))) (let ((left (* i (+ panel-w 1)))) (subgrid grid 0 left (- (rows grid) 1) (+ left panel-w -1)))))) (define transform-names (list 'id 'rot90 'rot180 'rot270 'flip-h 'flip-v 'transpose 'anti-transpose)) (define (anti-transpose-grid grid) (rotate-180 (transpose grid))) (define (apply-transform-name name grid) (cond ((equal? name 'id) grid) ((equal? name 'rot90) (rotate-cw grid)) ((equal? name 'rot180) (rotate-180 grid)) ((equal? name 'rot270) (rotate-ccw grid)) ((equal? name 'flip-h) (flip-lr grid)) ((equal? name 'flip-v) (flip-ud grid)) ((equal? name 'transpose) (transpose grid)) (else (anti-transpose-grid grid)))) (define (canonical-cells panel) (sort (normalize-cells (filter (lambda (p) (not (= (at panel (first p) (second p)) 0))) (grid-positions panel))) cell<)) (define (shape-dims cells) (let ((bb (bbox-of-cells cells))) (list (+ 1 (- (third bb) (first bb))) (+ 1 (- (fourth bb) (second bb)))))) (define (first-nonzero grids) (let ((vals (apply append (map (lambda (grid) (filter (lambda (v) (not (= v 0))) (apply append grid))) grids)))) (if (empty? vals) 0 (first vals)))) (define (support-of grid) (canonical-cells grid)) (define (support->grid cells color) (if (empty? cells) (list (list 0)) (let* ((dims (shape-dims cells)) (h (first dims)) (w (second dims))) (paint (empty-grid h w 0) cells color)))) (define (transform-support-name name grid) (support-of (apply-transform-name name (binary-grid grid)))) (let* ((panels (split-panels-row g 3)) (protos (list (first panels) (second panels))) (query (third panels)) (q-supp (support-of query)) (q-color (first-nonzero (list query))) (match (first (filter (lambda (p) (member? q-supp (map (lambda (name) (transform-support-name name p)) transform-names))) protos)))) (support->grid (support-of match) q-color))))
Provenance
- Generator
- generators/a51a8e285ce9/generator.py
- Notes and decisions
- generators/a51a8e285ce9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- d4dd73dd6d4f6692fe9aef54d07b7373ac64f5e8cebcbc577f962573543f01a6
- Rule hash
- d76e03446f2a
- Sources
- bank:5a410ab56119
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate a51a8e285ce9 --count 1 --seed 20261108 --test 1