← 501c7f0770eb · 504e304a77f1 →

50385c1a773f

A single red (2) source launches a beam to the right through black (0) cells. A green (3) slash mirror maps (dr,dc) to (-dc,-dr), while a yellow (4) backslash mirror maps it to (dc,dr). The beam stops at the first gray (5) cell or when it leaves the grid; every traversed black cell is painted cyan (8). All mirrors lie on the traced route. One or two straight gray wall components may be present, including an unused distractor wall on the boundary-exit branch demonstrated by the public test example.

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* ((source (first (find-color g 2))))
    (define (slash dr dc) (list (- 0 dc) (- 0 dr)))
    (define (backslash dr dc) (list dc dr))
    (let loop ([out g] [r (first source)] [c (+ (second source) 1)] [dr 0] [dc 1] [fuel 500])
      (if (or (= fuel 0) (not (in-bounds? r c (rows g) (cols g))) (= (at g r c) 5))
          out
          (let* ((v (at g r c))
                 (next-out (if (= v 0) (set-cell out r c 8) out))
                 (nd (cond [(= v 3) (slash dr dc)]
                           [(= v 4) (backslash dr dc)]
                           [else (list dr dc)])))
            (loop next-out (+ r (first nd)) (+ c (second nd)) (first nd) (second nd) (- fuel 1)))))))

Provenance

Generator
generators/50385c1a773f/generator.py
Notes and decisions
generators/50385c1a773f/notes.md
Review label
reviewed_safe
Generator SHA-256
1cdc0b6058f3d8e57a26fb0bc9c41028f9c176e87b7b9b6c375366f5e7c577a5
Rule hash
326ba9cc3a3b
Sources
bank:f4facb1306bd
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 50385c1a773f --count 1 --seed 20261108 --test 1