← 021fb6acf24f · 023f0cc17b52 →

02280b74c8ab

Largest magenta/orange components define equal square templates. An independently placed 1..8 index rectangle selects and rotates them; zero slots stay blank. Canonical symmetric and dense asymmetric shapes, 2/3-cell tile sizes, internal gaps, and exterior 9-decor are supported.

mosaic assemblyrotation codestemplate libraries

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 (e8b-crop-obj grid obj) (let ((bb (obj-bbox obj))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (define (e8b-paste grid pat top left) (for*/fold ((out grid)) ((r (in-range (rows pat))) (c (in-range (cols pat)))) (let ((v (at pat r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows out) (cols out))) (set-cell out rr cc v) out)))) (define (e8b-rotate-k grid k) (if (= k 0) grid (e8b-rotate-k (rotate-cw grid) (- k 1)))) (let* ((objs (objects g 0)) (t6 (first (sort (filter (lambda (obj) (= (obj-color obj) 6)) objs) (lambda (a b) (> (obj-size a) (obj-size b)))))) (t7 (first (sort (filter (lambda (obj) (= (obj-color obj) 7)) objs) (lambda (a b) (> (obj-size a) (obj-size b)))))) (a (e8b-crop-obj g t6)) (b (e8b-crop-obj g t7)) (used (append (obj-cells t6) (obj-cells t7))) (code-cells (filter (lambda (p) (and (<= 1 (at g (first p) (second p))) (<= (at g (first p) (second p)) 8) (not (member? p used)))) (grid-positions g))) (bb (bbox-of-cells code-cells)) (code (subgrid g (first bb) (second bb) (third bb) (fourth bb))) (th (rows a)) (tw (cols a))) (for*/fold ((out (empty-grid (* (rows code) th) (* (cols code) tw) 0))) ((r (in-range (rows code))) (c (in-range (cols code)))) (let* ((v (at code r c)) (pat (if (<= v 4) a b)) (k (if (<= v 4) (- v 1) (- v 5)))) (if (= v 0) out (e8b-paste out (e8b-rotate-k pat k) (* r th) (* c tw))))))))

Provenance

Generator
generators/02280b74c8ab/generator.py
Notes and decisions
generators/02280b74c8ab/notes.md
Review label
reviewed_safe
Generator SHA-256
c6c1fe92d20bffc6f109fc202d6861003e8594f73ff3495359b094328a1b66e8
Rule hash
a7b2395a133e
Sources
bank:9397d19eada0
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 02280b74c8ab --count 1 --seed 20261108 --test 1