← 4c33979d9cc2 · 4c93dc1552b3 →
4c4f94e7d611
Select the unique largest component as the template. Count singleton components, crop the template, and output that many horizontally arranged copies separated by one zero column, alternating original and left-right mirror starting with the original.
countgallerymirror
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 (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 (paste-crop grid shape top left) (for*/fold ((out grid)) ((r (in-range (rows shape))) (c (in-range (cols shape)))) (let ((v (at shape r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows grid) (cols grid))) (set-cell out rr cc v) out)))) (define (gallery-top shapes) (let* ((h (apply max (map rows shapes))) (w (+ (apply + (map cols shapes)) (max 0 (- (length shapes) 1))))) (let loop ((remaining shapes) (left 0) (out (empty-grid h w 0))) (if (empty? remaining) out (let ((shape (first remaining))) (loop (rest remaining) (+ left (cols shape) 1) (paste-crop out shape 0 left))))))) (let* ((comps (objects g 0)) (template (first (sort comps (lambda (a b) (> (obj-size a) (obj-size b)))))) (shape (component-grid template)) (n (length (filter (lambda (obj) (and (= (obj-size obj) 1) (not (equal? (obj-cells obj) (obj-cells template))))) comps))) (variants (map (lambda (i) (if (= (modulo i 2) 0) shape (flip-lr shape))) (range 0 n)))) (gallery-top variants))))
Provenance
- Generator
- generators/4c4f94e7d611/generator.py
- Notes and decisions
- generators/4c4f94e7d611/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 96088190dc76a6d94deea6f6fe73ce20061d24809a98974f6bb0bec3251217b1
- Rule hash
- d1c2577e1828
- Sources
- bank:483ae17489fc
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 4c4f94e7d611 --count 1 --seed 20261108 --test 1