← 9df67b512dad · 9e2802ee78bd →
9e10061f96e5
Create 2-4 horizontally separated monochrome shape panels. Crop and binarize each panel, compare shapes up to all rotations and reflections, and output an N x N matrix with 5 on the diagonal, 2 for equivalent off-diagonal pairs, and 0 otherwise. The sampler includes canonical 5-8-cell classes plus compact 3-4-cell classes and guarantees lessons that refute identity-only, rotation-only, and equal-size shortcuts.
dihedral equivalencerelational matrixshape 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).
Reference rule (Racket)
(rule!
(let ((dummy 0))
(define (split-blank-cols grid)
(let loop ([c 0] [panels (list)])
(cond [(>= c (cols grid)) (reverse panels)]
[(all? (lambda (r) (= (at grid r c) 0)) (range 0 (rows grid)))
(loop (+ c 1) panels)]
[else
(let scan ([stop c])
(if (or (>= stop (cols grid))
(all? (lambda (r) (= (at grid r stop) 0)) (range 0 (rows grid))))
(loop (+ stop 1)
(cons (subgrid grid 0 c (- (rows grid) 1) (- stop 1)) panels))
(scan (+ stop 1))))])))
(define (binary grid)
(grid-from-fn (rows grid) (cols grid)
(lambda (r c) (if (= (at grid r c) 0) 0 1))))
(define (row-lex< a b)
(cond [(empty? a) (not (empty? b))]
[(empty? b) #f]
[(not (= (first a) (first b))) (< (first a) (first b))]
[else (row-lex< (rest a) (rest b))]))
(define (grid-lex< a b)
(cond [(empty? a) (not (empty? b))]
[(empty? b) #f]
[(not (equal? (first a) (first b))) (row-lex< (first a) (first b))]
[else (grid-lex< (rest a) (rest b))]))
(define (canonical grid)
(let* ((shape (binary grid))
(variants (list shape
(rotate-cw shape)
(rotate-180 shape)
(transpose shape)
(flip-lr shape)
(flip-ud shape)
(rotate-cw (flip-lr shape))
(rotate-ccw shape))))
(first (sort (map crop-to-content variants) grid-lex<))))
(let* ((panels (map crop-to-content (split-blank-cols g)))
(canons (map canonical panels))
(n (length canons)))
(grid-from-fn n n
(lambda (r c)
(cond [(= r c) 5]
[(equal? (nth canons r) (nth canons c)) 2]
[else 0]))))))Provenance
- Generator
- generators/9e10061f96e5/generator.py
- Notes and decisions
- generators/9e10061f96e5/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 752eb64318030aeb18978e35769a2dadf77ff9e39bbeff4134d25fd10c42be38
- Rule hash
- 788540441b76
- Sources
- bank:63dac95f0c67
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 9e10061f96e5 --count 1 --seed 20261108 --test 1