← c792bb147617 · c7f337af82e5 →

c7c9b61d5a51

On a 0-background grid, color 5 cells are inert blockers and every other nonzero color marks exactly two endpoints in different rows and columns. For each endpoint pair, try the two possible L-shaped Manhattan paths. Exactly one route is clear of blockers and other endpoints in generated lessons; paint that route in the endpoint color and never connect color 5.

elbow pathsobstacle avoidancepaired routing

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 (t12b-line-cells r1 c1 r2 c2) (cond ((= r1 r2) (let ((step (if (<= c1 c2) 1 -1))) (map (lambda (c) (list r1 c)) (range c1 (+ c2 step) step)))) ((= c1 c2) (let ((step (if (<= r1 r2) 1 -1))) (map (lambda (r) (list r c1)) (range r1 (+ r2 step) step)))) (else (list)))) (define (t12b-clear-line? grid r1 c1 r2 c2 color) (and (or (= r1 r2) (= c1 c2)) (all? (lambda (p) (member? (at grid (first p) (second p)) (list 0 color))) (t12b-line-cells r1 c1 r2 c2)))) (for/fold ((out g)) ((color (in-list (remove-duplicates (filter (lambda (v) (not (member? v (list 0 5)))) (apply append g)))))) (let ((cells (find-color g color))) (if (= (length cells) 2) (let* ((a (first cells)) (b (second cells)) (r1 (first a)) (c1 (second a)) (r2 (first b)) (c2 (second b)) (elbows (list (list r1 c2) (list r2 c1))) (hits (filter (lambda (e) (and (t12b-clear-line? g r1 c1 (first e) (second e) color) (t12b-clear-line? g (first e) (second e) r2 c2 color))) elbows))) (if (empty? hits) out (let ((e (first hits))) (paint-cells (paint-cells out (t12b-line-cells r1 c1 (first e) (second e)) color) (t12b-line-cells (first e) (second e) r2 c2) color)))) out)))))

Provenance

Generator
generators/c7c9b61d5a51/generator.py
Notes and decisions
generators/c7c9b61d5a51/notes.md
Review label
reviewed_safe
Generator SHA-256
70a373dd8e3e3ca917e96fd1724981a794a2dc124d5c28701b3d1727a7a97ddd
Rule hash
82200d439ef3
Sources
bank:580a8993495c
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate c7c9b61d5a51 --count 1 --seed 20261108 --test 1