← 48fee61713bb · 492fe98aff2b →

49197f3c9375

Five separated motifs: two dihedral-equivalent pairs and one unmatched shape; the rule returns the unmatched shape's cropped boundary.

parametric familydihedral equivalenceodd-one-outshape canonicalization

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 (normalize cells) (let* ((bb (bbox-of-cells cells))) (sort (map (lambda (p) (list (- (first p) (first bb)) (- (second p) (second bb)))) cells) cell<))) (define (mirror-h pts) (let ((maxc (apply max (map second pts)))) (sort (map (lambda (p) (list (first p) (- maxc (second p)))) pts) cell<))) (define (rot1 pts) (let ((maxr (apply max (map first pts)))) (normalize (map (lambda (p) (list (second p) (- maxr (first p)))) pts)))) (define (rotate pts k) (let loop ((n (modulo k 4)) (acc pts)) (if (= n 0) acc (loop (- n 1) (rot1 acc))))) (define (signature obj) (let* ((pts (normalize (obj-cells obj))) (vars (remove-duplicates (apply append (for/list ((k (in-range 4))) (let ((r (rotate pts k))) (list r (mirror-h r)))))))) (first (sort vars (lambda (a b) (string<? (format "~a" a) (format "~a" b))))))) (define objs (objects g 0)) (define sigs (foldl (lambda (obj acc) (let ((sig (signature obj))) (if (member sig acc) acc (append acc (list sig))))) (list) objs)) (define target-sig (first (filter (lambda (sig) (= (count-where (lambda (obj) (equal? (signature obj) sig)) objs) 1)) sigs))) (define target (first (filter (lambda (obj) (equal? (signature obj) target-sig)) objs))) (let* ((bb (bbox-of-cells (obj-cells target))) (h (+ 1 (- (third bb) (first bb)))) (w (+ 1 (- (fourth bb) (second bb))))) (paint-cells (empty-grid h w 0) (sort (map (lambda (p) (list (- (first p) (first bb)) (- (second p) (second bb)))) (obj-boundary-cells target)) cell<) (obj-color target)))))

Provenance

Generator
generators/49197f3c9375/generator.py
Notes and decisions
generators/49197f3c9375/notes.md
Review label
reviewed_safe
Generator SHA-256
a23b045bf7c4c3f8bb72e8aaf5eb7662f156e835d24711308ad6b25422b41dcd
Rule hash
4303be5db475
Sources
bank:fe45a3aa7042
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 49197f3c9375 --count 1 --seed 20261108 --test 1