← d1bf9a8e4c69 · d1dab66b0d54 →

d1c500f060a1

Apply row-0 transform codes 1..5 to a base motif and pack the pieces.

parametric familygalleryscripttransforms

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 (crop-nz grid) (crop-to-content grid 0)) (define (transform-code grid code) (cond ((= code 1) (rotate-cw grid)) ((= code 2) (rotate-180 grid)) ((= code 3) (rotate-ccw grid)) ((= code 4) (flip-lr grid)) ((= code 5) (flip-ud grid)) (else grid))) (define (shape-place out crop top left) (for*/fold ((acc out)) ((r (in-range (rows crop))) (c (in-range (cols crop)))) (let ((v (at crop r c))) (if (= v 0) acc (set-cell acc (+ top r) (+ left c) v))))) (define codes (filter (lambda (v) (not (= v 0))) (row g 0))) (define base (if (> (rows g) 2) (crop-nz (subgrid g 2 0 (- (rows g) 1) (- (cols g) 1))) (grid (list 0)))) (define pieces (map (lambda (code) (transform-code base code)) codes)) (define out-h (apply max (map rows pieces))) (define out-w (+ (apply + (map cols pieces)) (max 0 (- (length pieces) 1)))) (let pack ((remaining pieces) (c0 0) (out (empty-grid out-h out-w 0))) (if (empty? remaining) out (let ((piece (first remaining))) (pack (rest remaining) (+ c0 (cols piece) 1) (shape-place out piece 0 c0)))))))

Provenance

Generator
generators/d1c500f060a1/generator.py
Notes and decisions
generators/d1c500f060a1/notes.md
Review label
reviewed_safe
Generator SHA-256
22c5872369b878331b4a51d76d19277522e8baea6627ad7c186e4444f1cf42ab
Rule hash
51a8a034cf56
Sources
bank:5dfff1627b31
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate d1c500f060a1 --count 1 --seed 20261108 --test 1