← 95b47c355ae4 · 95f82d34a755 →

95be702ec4db

A gallery of three to five separated hollow color-9 frames. Each contains one connected single-color shape, and the output is the cyan pairwise rotation-equivalence matrix over frames ordered from left to right.

parametric familyabstract relation matrixrotation invarianceshape normalization

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 (nonzero-cells grid) (filter (lambda (p) (not (= (at grid (first p) (second p)) 0))) (grid-positions grid))) (define (crop-nonzero grid) (let ((cells (nonzero-cells grid))) (if (empty? cells) (list (list 0)) (let* ((bb (bbox-of-cells cells))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))))) (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 (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 (e11b-inner grid obj) (let* ((bb (obj-bbox obj))) (subgrid grid (+ (first bb) 1) (+ (second bb) 1) (- (third bb) 1) (- (fourth bb) 1)))) (define (e11b-binary grid) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 1)))) (define (e11b-normal-binary grid) (e11b-binary (crop-nonzero grid))) (define (e11b-rot-equal? a b) (let ((target (e11b-normal-binary b))) (any? (lambda (name) (equal? (apply-transform-name name (e11b-normal-binary a)) target)) (list 'id 'rot90 'rot180 'rot270)))) (define (e11b-color-objs grid color sort-key) (sort (filter (lambda (obj) (= (obj-color obj) color)) (objects grid 0)) (lambda (a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (cond ((equal? sort-key 'col) (e8b-list< (list (second ba) (first ba)) (list (second bb) (first bb)))) ((equal? sort-key 'row) (e8b-list< (list (first ba) (second ba)) (list (first bb) (second bb)))) (else (e8b-list< (list (first ba) (second ba)) (list (first bb) (second bb))))))))) (let* ((frames (e11b-color-objs g 9 'col)) (inners (map (lambda (frame) (e11b-inner g frame)) frames)) (n (length inners))) (grid-from-fn n n (lambda (r c) (if (e11b-rot-equal? (list-ref inners r) (list-ref inners c)) 8 0))))))

Provenance

Generator
generators/95be702ec4db/generator.py
Notes and decisions
generators/95be702ec4db/notes.md
Review label
reviewed_safe
Generator SHA-256
56e3105d3da09e816e6bee8e3620bb5e1a9bb0a7228da02da9cba410db683369
Rule hash
4810d55a18e8
Sources
bank:db2a1cce4e4e
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 95be702ec4db --count 1 --seed 20261108 --test 1