← 7ce16af847d6 · 7d1e8744229a →

7d09ccad28c8

One or two separate hollow cyan(8) frames on a 0 background. Each frame contains exactly one key (1=up, 2=right, 3=down, 4=left), one magenta(6) emitter, and one orange(7) blocker. Cast a magenta ray from each emitter in the keyed direction until a blocker or the frame wall.

parametric familydirection keysframe-local reasoningobstacle-aware casting

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 (e8-cell<? a b) (or (< (first a) (first b)) (and (= (first a) (first b)) (< (second a) (second b))))) (define (e8-rect-border? obj) (let* ((bb (obj-bbox obj)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (border (filter (lambda (p) (or (= (first p) r1) (= (first p) r2) (= (second p) c1) (= (second p) c2))) (positions-in-rect r1 c1 r2 c2)))) (equal? (sort (obj-cells obj) e8-cell<?) (sort border e8-cell<?)))) (define (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (e8b-frame-objs grid color) (sort (filter (lambda (obj) (let* ((bb (obj-bbox obj)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb))) (and (= (obj-color obj) color) (>= (- r2 r1) 2) (>= (- c2 c1) 2) (e8-rect-border? obj)))) (objects grid 0)) (lambda (a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (e8b-list< (list (first ba) (second ba)) (list (first bb) (second bb))))))) (define (e8b-outline-box grid box color) (let* ((r1 (first box)) (c1 (second box)) (r2 (third box)) (c2 (fourth box)) (border (filter (lambda (p) (or (= (first p) r1) (= (first p) r2) (= (second p) c1) (= (second p) c2))) (positions-in-rect r1 c1 r2 c2)))) (paint-cells grid border color))) (define (e8b-dir v) (cond ((= v 1) (list -1 0)) ((= v 2) (list 0 1)) ((= v 3) (list 1 0)) ((= v 4) (list 0 -1)) (else #f))) (for/fold ((out0 (empty-grid (rows g) (cols g) 0))) ((frame (in-list (e8b-frame-objs g 8)))) (let* ((bb (obj-bbox frame)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (inside (positions-in-rect (+ r1 1) (+ c1 1) (- r2 1) (- c2 1))) (emitter (first (filter (lambda (p) (= (at g (first p) (second p)) 6)) inside))) (keyp (first (filter (lambda (p) (e8b-dir (at g (first p) (second p)))) inside))) (key (at g (first keyp) (second keyp))) (dir (e8b-dir key)) (base (for/fold ((out (e8b-outline-box out0 bb 8))) ((p (in-list inside))) (let ((v (at g (first p) (second p)))) (if (member? v (list 1 2 3 4 6 7)) (set-cell out (first p) (second p) v) out))))) (let loop ((r (+ (first emitter) (first dir))) (c (+ (second emitter) (second dir))) (out base)) (cond ((not (and (> r r1) (< r r2) (> c c1) (< c c2))) out) ((= (at g r c) 7) out) (else (loop (+ r (first dir)) (+ c (second dir)) (if (= (at out r c) 0) (set-cell out r c 6) out)))))))))

Provenance

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