← b8e2a07c1b6c · b90d4c3d5553 →
b9058b6ccb82
A 0-background grid contains 3-4 halo-separated objects in distinct non-zero colors. All but one share a free-polyomino shape under rotation and reflection. Output the singleton object's observed pose and color, cropped to its tight bounding box.
dihedral_symmetryextractionobject_reasoningshape_match
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 (flat grid) (apply append grid)) (define (component-grid obj) (for/fold ((out (empty-grid (+ 1 (- (obj-r2 obj) (obj-r1 obj))) (+ 1 (- (obj-c2 obj) (obj-c1 obj))) 0))) ((p (in-list (obj-cells obj)))) (set-cell out (- (first p) (obj-r1 obj)) (- (second p) (obj-c1 obj)) (obj-color obj)))) (define (binary-shape grid) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 1)))) (define (shape-key grid) (append (list (rows grid) (cols grid)) (flat grid))) (define (lex-list< a b) (cond ((empty? a) (not (empty? b))) ((empty? b) #f) ((not (= (first a) (first b))) (< (first a) (first b))) (else (lex-list< (rest a) (rest b))))) (define (shape< a b) (lex-list< (shape-key a) (shape-key b))) (define (unique-grids grids) (let loop ((remaining grids) (acc (list))) (cond ((empty? remaining) acc) ((any? (lambda (g2) (equal? g2 (first remaining))) acc) (loop (rest remaining) acc)) (else (loop (rest remaining) (append acc (list (first remaining)))))))) (define (all-dihedral-forms shape) (let* ((r0 shape) (r1 (rotate-cw r0)) (r2 (rotate-cw r1)) (r3 (rotate-cw r2))) (unique-grids (list r0 (flip-lr r0) r1 (flip-lr r1) r2 (flip-lr r2) r3 (flip-lr r3))))) (define (canonical-dihedral shape) (first (sort (all-dihedral-forms shape) shape<))) (define (count-equal xs value) (length (filter (lambda (x) (equal? x value)) xs))) (let* ((comps (objects g 0)) (canons (map (lambda (obj) (canonical-dihedral (binary-shape (component-grid obj)))) comps)) (odd (first (filter values (map (lambda (obj canon) (if (= (count-equal canons canon) 1) obj #f)) comps canons))))) (component-grid odd))))
Provenance
- Generator
- generators/b9058b6ccb82/generator.py
- Notes and decisions
- generators/b9058b6ccb82/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 79df3b69bd681935603be34621a08a6766268825e5ca536ba1b446cc219f56ae
- Rule hash
- 7fc0dbf623b9
- Sources
- bank:e07509d599a1
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate b9058b6ccb82 --count 1 --seed 20261108 --test 1