← 1ec277b81469 · 1ee7274bdbb0 →
1ecf6add3fe7
Split the grid into three equal panels at the two full-height color-5 separators. Match the third panel's color-1 query shape to exactly one of the first two color-1 prototype shapes up to rotation/reflection, then recolor the query cells with that prototype's top-left label 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 (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (f4-norm cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb))) (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) cells))) (define (nb-sort-cells cells) (sort cells e8b-list<)) (define (nb-norm cells) (nb-sort-cells (f4-norm cells))) (define (s17-split-panel-row grid count) (let ((pw (quotient (- (cols grid) (- count 1)) count))) (for/list ((i (in-range count))) (let ((left (* i (+ pw 1)))) (grid-from-fn (rows grid) pw (lambda (r c) (at grid r (+ left c)))))))) (define (s17-nonzero-cells grid) (filter (lambda (p) (not (= (at grid (first p) (second p)) 0))) (grid-positions grid))) (define (s17-anti-transpose grid) (grid-from-fn (cols grid) (rows grid) (lambda (r c) (at grid (- (rows grid) 1 c) (- (cols grid) 1 r))))) (define (s17-transform grid kind) (cond ((equal? kind 'id) grid) ((equal? kind 'rot90) (rotate-cw grid)) ((equal? kind 'rot180) (rotate-180 grid)) ((equal? kind 'rot270) (rotate-ccw grid)) ((equal? kind 'flip_h) (flip-lr grid)) ((equal? kind 'flip_v) (flip-ud grid)) ((equal? kind 'transpose) (transpose grid)) ((equal? kind 'anti_transpose) (s17-anti-transpose grid)) (else grid))) (define (s17-transform-kinds) (list 'id 'rot90 'rot180 'rot270 'flip_h 'flip_v 'transpose 'anti_transpose)) (define (s17-canonical-shape grid) (let ((cells (s17-nonzero-cells grid))) (if (empty? cells) (list) (sort (nb-norm cells) e8b-list<)))) (define (s17-transformed-canonical-shapes grid) (remove-duplicates (map (lambda (kind) (s17-canonical-shape (s17-transform grid kind))) (s17-transform-kinds)))) (define (s16-panel-occ panel) (let ((cells (filter (lambda (p) (and (not (= (at panel (first p) (second p)) 0)) (not (and (= (first p) 0) (= (second p) 0))))) (grid-positions panel)))) (if (empty? cells) (list) (sort (nb-norm cells) e8b-list<)))) (define (s16-occ-grid occ) (if (empty? occ) (list (list 0)) (let* ((bb (bbox-of-cells occ)) (h (+ 1 (- (third bb) (first bb)))) (w (+ 1 (- (fourth bb) (second bb))))) (paint-cells (empty-grid h w 0) occ 1)))) (let* ((panels (s17-split-panel-row g 3)) (p1 (first panels)) (p2 (second panels)) (p3 (third panels)) (label1 (at p1 0 0)) (label2 (at p2 0 0)) (occ1 (s16-panel-occ p1)) (occ2 (s16-panel-occ p2)) (qocc (s16-panel-occ p3)) (qvars (s17-transformed-canonical-shapes (s16-occ-grid qocc))) (label (if (and (member? occ1 qvars) (not (member? occ2 qvars))) label1 (if (and (member? occ2 qvars) (not (member? occ1 qvars))) label2 (if (member? occ1 qvars) label1 label2))))) (grid-from-fn (rows p3) (cols p3) (lambda (r c) (if (and (not (= (at p3 r c) 0)) (not (and (= r 0) (= c 0)))) label 0))))))
Provenance
- Generator
- generators/1ecf6add3fe7/generator.py
- Notes and decisions
- generators/1ecf6add3fe7/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 5c438ff1d6f1aad17a679d50f21b1dcb00847f816a1d86d939074e6c8f060fee
- Rule hash
- 9be86eb85768
- Sources
- bank:5b06d39592a3
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 1ecf6add3fe7 --count 1 --seed 20261108 --test 1