← 564cab531f76 · 569aa05e004d →
5666b68dd4b9
(0,0) selects a body colour and (0,w-1) selects cw/180/flip-LR/identity; transform the selected tight crop and transparently center it in the hollow colour-8 frame after clearing every other cell.
frameselectiontransform
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 (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 (floor-half n) (if (>= n 0) (quotient n 2) (- (quotient (+ (- n) 1) 2)))) (define (center-paste out sub r1 c1 r2 c2) (let* ((h (+ 1 (- r2 r1))) (w (+ 1 (- c2 c1))) (top (+ r1 (floor-half (- h (rows sub))))) (left (+ c1 (floor-half (- w (cols sub)))))) (place-transparent out sub top left))) (define (transform-by-code grid code) (cond ((= code 1) (rotate-cw grid)) ((= code 2) (rotate-180 grid)) ((= code 3) (flip-lr grid)) (else grid))) (let* ((select-color (at g 0 0)) (tcode (at g 0 (- (cols g) 1))) (temp (set-cell (set-cell g 0 0 0) 0 (- (cols g) 1) 0)) (cells (find-color temp select-color))) (if (empty? cells) (empty-grid (rows g) (cols g) 0) (let* ((bb (bbox-of-cells cells)) (obj (transform-by-code (subgrid temp (first bb) (second bb) (third bb) (fourth bb)) tcode)) (fbb (bbox-of-cells (find-color temp 8))) (base (draw-rect-outline (empty-grid (rows g) (cols g) 0) (first fbb) (second fbb) (third fbb) (fourth fbb) 8))) (center-paste base obj (+ (first fbb) 1) (+ (second fbb) 1) (- (third fbb) 1) (- (fourth fbb) 1)))))))
Provenance
- Generator
- generators/5666b68dd4b9/generator.py
- Notes and decisions
- generators/5666b68dd4b9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- a894ec3d03b38e2d7a91b9269cced43654b6e73d8c811c2309cf22fd4f5e485a
- Rule hash
- 5a2705a2ea24
- Sources
- bank:056856052daa
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5666b68dd4b9 --count 1 --seed 20261108 --test 1