← 1674812130ff · 16d18a416d57 →

167a1374f6c3

Read contiguous transform codes from row 0 until the first zero. Crop the monochrome motif below the blank separator row. Output the original crop followed by every cumulative transform state, top-aligned with one blank column between panels. Codes 1/2/3/4 mean rotate-cw/rotate-180/rotate-ccw/flip-lr.

galleryscriptstransforms

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 (rot270 grid) (rotate-cw (rotate-180 grid))) (define (transform-key grid key) (cond ((= key 1) (rotate-cw grid)) ((= key 2) (rotate-180 grid)) ((= key 3) (rot270 grid)) ((= key 4) (flip-lr grid)) (else grid))) (define (place-transparent out sub top left) (for*/fold ((acc out)) ((r (in-range (rows sub))) (c (in-range (cols sub)))) (let ((v (at sub r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows out) (cols out))) (set-cell acc rr cc v) acc)))) (define (gallery-top grids) (let* ((h (if (empty? grids) 1 (apply max (map rows grids)))) (w (if (empty? grids) 1 (+ (apply + (map cols grids)) (max 0 (- (length grids) 1)))))) (let loop ((remaining grids) (left 0) (out (empty-grid h w 0))) (if (empty? remaining) out (let ((piece (first remaining))) (loop (rest remaining) (+ left (cols piece) 1) (place-transparent out piece 0 left))))))) (define codes (let loop ((c 0) (acc (list))) (cond ((>= c (cols g)) (reverse acc)) ((= (at g 0 c) 0) (reverse acc)) (else (loop (+ c 1) (cons (at g 0 c) acc)))))) (define body (subgrid g 1 0 (- (rows g) 1) (- (cols g) 1))) (define start (crop-to-content body)) (let loop ((remaining codes) (cur start) (states (list start))) (if (empty? remaining) (gallery-top (reverse states)) (let ((next (transform-key cur (first remaining)))) (loop (rest remaining) next (cons next states)))))))

Provenance

Generator
generators/167a1374f6c3/generator.py
Notes and decisions
generators/167a1374f6c3/notes.md
Review label
reviewed_safe
Generator SHA-256
2f0de677a7499b6c0f40a6eca80de08a6d1ae83f6495f4e5daa1ea4fcf87cc6c
Rule hash
91349b01b34b
Sources
bank:f49e478ddaeb
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 167a1374f6c3 --count 1 --seed 20261108 --test 1