← dfdc40167549 · e03758508612 →

e005c30bc59a

A single source in color 3/4/6/7/8/9 sits on a non-corner border cell and launches a beam inward. Color 1 is a slash mirror, color 2 a backslash mirror, and color 5 a wall. The beam paints traversed black cells with the source color, turns at reached mirrors, and stops at a wall or boundary. Every ordinary draw reaches at least one mirror; optional off-route mirrors and walls teach that only objects encountered by the beam matter. One cyclic lesson role crosses an earlier beam cell and visibly continues afterward.

beammirrorspath

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 source (first (filter (lambda (p) (let ((v (at g (first p) (second p)))) (and (not (= v 0)) (not (= v 1)) (not (= v 2)) (not (= v 5))))) (border-positions g)))) (define color (at g (first source) (second source))) (define start-dir (cond ((= (first source) 0) (list 1 0)) ((= (first source) (- (rows g) 1)) (list -1 0)) ((= (second source) 0) (list 0 1)) (else (list 0 -1)))) (define (slash d) (list (- (second d)) (- (first d)))) (define (backslash d) (list (second d) (first d))) (let loop ((out g) (r (+ (first source) (first start-dir))) (c (+ (second source) (second start-dir))) (d start-dir) (fuel (* 5 (rows g) (cols g)))) (cond ((or (= fuel 0) (not (in-bounds? r c (rows g) (cols g)))) out) (else (let ((v (at g r c))) (cond ((= v 0) (loop (set-cell out r c color) (+ r (first d)) (+ c (second d)) d (- fuel 1))) ((= v 5) out) ((= v 1) (let ((nd (slash d))) (loop out (+ r (first nd)) (+ c (second nd)) nd (- fuel 1)))) ((= v 2) (let ((nd (backslash d))) (loop out (+ r (first nd)) (+ c (second nd)) nd (- fuel 1)))) (else out))))))))

Provenance

Generator
generators/e005c30bc59a/generator.py
Notes and decisions
generators/e005c30bc59a/notes.md
Review label
reviewed_safe
Generator SHA-256
4cffc894fadae67da8d9102054d64545ed4f4d9e1ba8f11a7d4c42fbc3fb539d
Rule hash
9114178dd0f7
Sources
bank:cf5246d38569
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e005c30bc59a --count 1 --seed 20261108 --test 1