← 4e53f3cd64e8 · 4e79c276ce9d →
4e6862c442fd
A sparse 0-background grid contains one SOURCE L-frame: color 2 is its origin, color 3 marks its local u direction, and color 4 marks its perpendicular local v direction. A non-rectangular color-8 motif lies at signed local offsets around that source. A TARGET L-frame similarly uses colors 5,6,7. Copy every source motif offset to the same (u,v) coordinate around the target, so the copied motif rotates or reflects with the target basis. The source, both frames, and all existing cells remain.
rotation/reflection handling, local transport, same-size output
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 (point< a b) (cond ((not (= (first a) (first b))) (< (first a) (first b))) ((not (= (second a) (second b))) (< (second a) (second b))) (else (< (third a) (third b))))) (define (make-frame origin vx vy colors) (list origin vx vy colors)) (define (frame-origin f) (first f)) (define (frame-vx f) (second f)) (define (frame-vy f) (third f)) (define (frame< a b) (let ((oa (frame-origin a)) (ob (frame-origin b)) (vxa (frame-vx a)) (vxb (frame-vx b)) (vya (frame-vy a)) (vyb (frame-vy b))) (cond ((not (= (first oa) (first ob))) (< (first oa) (first ob))) ((not (= (second oa) (second ob))) (< (second oa) (second ob))) ((not (= (first vxa) (first vxb))) (< (first vxa) (first vxb))) ((not (= (second vxa) (second vxb))) (< (second vxa) (second vxb))) ((not (= (first vya) (first vyb))) (< (first vya) (first vyb))) (else (< (second vya) (second vyb)))))) (define (gpos frame u v) (let* ((origin (frame-origin frame)) (vx (frame-vx frame)) (vy (frame-vy frame))) (list (+ (first origin) (* u (first vx)) (* v (first vy))) (+ (second origin) (* u (second vx)) (* v (second vy)))))) (define (lpos frame p) (let* ((origin (frame-origin frame)) (dr (- (first p) (first origin))) (dc (- (second p) (second origin))) (vx (frame-vx frame)) (vy (frame-vy frame))) (list (+ (* dr (first vx)) (* dc (second vx))) (+ (* dr (first vy)) (* dc (second vy)))))) (define (find-frames grid colors) (let* ((a (first colors)) (b (second colors)) (c (third colors)) (raw (filter values (for*/list ((r (in-range (rows grid))) (col (in-range (cols grid))) (dx (in-list cardinal-deltas)) (dy (in-list cardinal-deltas))) (let* ((xr (+ r (first dx))) (xc (+ col (second dx))) (yr (+ r (first dy))) (yc (+ col (second dy)))) (if (and (= (at grid r col) a) (in-bounds? xr xc (rows grid) (cols grid)) (in-bounds? yr yc (rows grid) (cols grid)) (= (at grid xr xc) b) (= (at grid yr yc) c) (= (+ (* (first dx) (first dy)) (* (second dx) (second dy))) 0)) (make-frame (list r col) dx dy colors) #f)))))) (sort (remove-duplicates raw) frame<))) (define (extract-local-points grid frame colors radius) (let ((rad (min radius 3))) (sort (filter values (for*/list ((r (in-range (rows grid))) (c (in-range (cols grid)))) (let ((v (at grid r c))) (if (member? v colors) (let ((uv (lpos frame (list r c)))) (if (<= (max (abs (first uv)) (abs (second uv))) rad) (list (first uv) (second uv) v) #f)) #f)))) point<))) (define (point-color p) (third p)) (define (paint-local-points grid frame points) (for/fold ((out grid)) ((p (in-list points))) (let ((rc (gpos frame (first p) (second p)))) (set-cell out (first rc) (second rc) (point-color p))))) (let* ((sf (first (find-frames g (list 2 3 4)))) (tf (first (find-frames g (list 5 6 7)))) (pts (extract-local-points g sf (list 8) 4))) (paint-local-points g tf pts))))
Provenance
- Generator
- generators/4e6862c442fd/generator.py
- Notes and decisions
- generators/4e6862c442fd/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 7dc70c5bd0b0658235b73b9802bccd54610f1dfcd1b6f848e878f1795f95828b
- Rule hash
- 1e279b7f949b
- Sources
- bank:f05110b6a734
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 4e6862c442fd --count 1 --seed 20261108 --test 1