← e5ec1ac39df5 · e685e65af79d →

e64c021e29ad

Each color-5..9 object has one touching code cell. Codes 1/2/3/4 mean up/right/down/left. Remove every code, then paint a same-color ray from each original object cell in its coded direction through the grid edge.

parametric family

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 dirs4 (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))) (define (e5-arrow-dir code) (cond ((= code 1) (list -1 0)) ((= code 2) (list 0 1)) ((= code 3) (list 1 0)) ((= code 4) (list 0 -1)) (else #f))) (define (e5-sweep-cells cells dr dc h w stop-cells) (remove-duplicates (append cells (apply append (map (lambda (cell) (let loop ((r (+ (first cell) dr)) (c (+ (second cell) dc)) (acc (list))) (if (and (in-bounds? r c h w) (not (member? (list r c) stop-cells))) (loop (+ r dr) (+ c dc) (cons (list r c) acc)) (reverse acc)))) cells))))) (let ((obj-grid (grid-from-fn (rows g) (cols g) (lambda (r c) (let ((v (at g r c))) (if (>= v 5) v 0)))))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((obj (in-list (objects obj-grid 0)))) (let* ((arrow-pos (first (filter values (for*/list ((p (in-list (obj-cells obj))) (d (in-list dirs4))) (let ((rr (+ (first p) (first d))) (cc (+ (second p) (second d)))) (if (and (in-bounds? rr cc (rows g) (cols g)) (e5-arrow-dir (at g rr cc))) (list rr cc) #f)))))) (dir (e5-arrow-dir (at g (first arrow-pos) (second arrow-pos))))) (paint-cells out (e5-sweep-cells (obj-cells obj) (first dir) (second dir) (rows g) (cols g) (list)) (obj-color obj)))))))

Provenance

Generator
generators/e64c021e29ad/generator.py
Notes and decisions
generators/e64c021e29ad/notes.md
Review label
reviewed_safe
Generator SHA-256
8349541496f9d16301ab6cf614b39758d4f6ea5a8f8d4fc8b8fa7f5ce39dad0a
Rule hash
69a4bb5ee756
Sources
bank:bfb58307fa26
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate e64c021e29ad --count 1 --seed 20261108 --test 1