← 49c16a3506ab · 49fe4f572f8d →
49f2e1c9f51a
Extend the green segment until blocked, turn orthogonally toward the red segment, and restore the red target.
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! (lambda (g)
(let* ((h (rows g))
(w (cols g)))
(let* ((threes (find-color g 3))
(twos (find-color g 2))
(r3a (min-of first threes))
(r3b (max-of first threes))
(c3a (min-of second threes))
(c3b (max-of second threes))
(r2a (min-of first twos))
(r2b (max-of first twos))
(c2a (min-of second twos))
(c2b (max-of second twos))
(horiz (= r3a r3b)))
(define (inside? r c) (and (>= r 0) (< r h) (>= c 0) (< c w)))
(define (walk r c dr dc)
(let loop
((rr r) (cc c))
(let ((nr (+ rr dr))
(nc (+ cc dc)))
(if (and (inside? nr nc) (zero? (at g nr nc)))
(loop nr nc)
(list rr cc)))))
(let* ((dc (if horiz (if (>= (+ c2a c2b) (+ c3a c3b)) 1 -1) 0))
(dr (if horiz 0 (if (> (+ r2a r2b) (+ r3a r3b)) 1 -1)))
(sr (if horiz r3a (if (= dr 1) r3b r3a)))
(sc (if horiz (if (= dc 1) c3b c3a) c3a))
(tr (if horiz r2a (if (= dr 1) r2a r2b)))
(tc (if horiz (if (= dc 1) c2b c2a) c2a))
(corner1 (walk sr sc dr dc))
(cr (first corner1))
(cc (second corner1))
(corner2 (if horiz (list tr cc) (list cr tc)))
(path (append (line-cells sr sc cr cc)
(line-cells cr cc (first corner2) (second corner2))
(line-cells (first corner2) (second corner2) tr tc)))
(painted (paint-cells g path 3)))
(paint-cells painted twos 2))))))Provenance
- Generator
- generators/49f2e1c9f51a/generator.py
- Notes and decisions
- generators/49f2e1c9f51a/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 125ee9cdf5665f25ed334b54290c741f68605508b38fc543a0844d8ad80286e9
- Rule hash
- f0623adfb8cc
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 49f2e1c9f51a --count 1 --seed 20261108 --test 1