← 70c33a3391ac · 70f97d6b605b →
70c9dccdcc4d
Two 3-cell L-frames in distinct color-triples ({2,3,4} for source with 2 at corner; {5,6,7} for target with 5 at corner). Several color-8 cells are placed near the source. Rule maps the 8-cells from source to target frame via diagonal reflection of their local (u, v) offsets, painting 8 at the corresponding target positions.
coordinate transforms, local reflection, orientation-aware rendering
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!
;; Two orthogonal color tripods act as coordinate frames. The SOURCE frame
;; is a 2-cell whose 3-neighbor gives the x axis and 4-neighbor the y axis;
;; the TARGET frame is a 5-cell with 6 and 7 likewise. The 8-marker cells
;; within Chebyshev radius 3 of the source origin (in source-local
;; coordinates) are reflected across the local diagonal -- (u v) becomes
;; (v u) -- and painted into the target frame. Rest of grid unchanged.
(lambda (g)
(let ()
(define (lex< a b) ;; lexicographic over equal-length number lists
(cond ((null? a) #f)
((not (= (first a) (first b))) (< (first a) (first b)))
(else (lex< (rest a) (rest b)))))
(define (find-frame a b c) ;; -> (origin vx vy), lex-first candidate
(first
(sort (remove-duplicates
(filter values
(for*/list ((r (range h)) (col (range w))
(dx cardinal-deltas) (dy cardinal-deltas))
(and (= (at g r col) a)
(in-bounds? (+ r (first dx)) (+ col (second dx)) h w)
(in-bounds? (+ r (first dy)) (+ col (second dy)) h w)
(= (at g (+ r (first dx)) (+ col (second dx))) b)
(= (at g (+ r (first dy)) (+ col (second dy))) c)
(zero? (+ (* (first dx) (first dy))
(* (second dx) (second dy))))
(list (list r col) dx dy)))))
(lambda (fa fb)
(lex< (append (first fa) (second fa) (third fa))
(append (first fb) (second fb) (third fb)))))))
(define (lpos f r c) ;; grid position -> frame-local (u v)
(let ((dr (- r (first (first f))))
(dc (- c (second (first f)))))
(list (+ (* dr (first (second f))) (* dc (second (second f))))
(+ (* dr (first (third f))) (* dc (second (third f)))))))
(define (gpos f u v) ;; frame-local (u v) -> grid position
(list (+ (first (first f))
(* u (first (second f))) (* v (first (third f))))
(+ (second (first f))
(* u (second (second f))) (* v (second (third f))))))
(define src (find-frame 2 3 4))
(define tgt (find-frame 5 6 7))
(define pts ;; (u v color) 8-markers near the source origin, sorted
(sort (filter values
(for*/list ((r (range h)) (c (range w)))
(and (= (at g r c) 8)
(let ((uv (lpos src r c)))
(and (<= (max (abs (first uv)) (abs (second uv))) 3)
(list (first uv) (second uv) 8))))))
lex<))
(for/fold ((out g)) ((p pts)) ;; reflect (u v) -> (v u), paint at target
(let ((rc (gpos tgt (second p) (first p))))
(set-cell out (first rc) (second rc) (third p)))))))Provenance
- Generator
- generators/70c9dccdcc4d/generator.py
- Notes and decisions
- generators/70c9dccdcc4d/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- d4d476d5da10cd22b82a61a8f5e5db425abc6b8a954e4c683a8b344212e8a667
- Rule hash
- 06513d532f1c
- Sources
- bank:f05110b6a734
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 70c9dccdcc4d --count 1 --seed 20261108 --test 1