← d4171e13daca · d47a6fca9d15 →
d476983a3d6c
Keep the input grid. Read command 1 or 2 at (0,0). In row-major first-appearance order, connect every color that has exactly two cells with an L path of that color: command 1 uses horizontal then vertical; command 2 uses vertical then horizontal. Singleton colors stay unchanged, and later pair colors win where paths overlap.
parametric familycontrol_signalpairspathssame_size
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 (first-appearance-palette grid) (let loop ((positions (grid-positions grid)) (seen (list))) (if (empty? positions) seen (let* ((p (first positions)) (v (at grid (first p) (second p)))) (if (or (= v 0) (member? v seen)) (loop (rest positions) seen) (loop (rest positions) (append seen (list v)))))))) (define (draw-l-path grid color a b order) (let ((r1 (first a)) (c1 (second a)) (r2 (first b)) (c2 (second b))) (if (= order 1) (let* ((cstep (if (>= c2 c1) 1 -1)) (with-h (for/fold ((out grid)) ((c (in-range c1 (+ c2 cstep) cstep))) (set-cell out r1 c color))) (rstep (if (>= r2 r1) 1 -1))) (for/fold ((out with-h)) ((r (in-range r1 (+ r2 rstep) rstep))) (set-cell out r c2 color))) (let* ((rstep (if (>= r2 r1) 1 -1)) (with-v (for/fold ((out grid)) ((r (in-range r1 (+ r2 rstep) rstep))) (set-cell out r c1 color))) (cstep (if (>= c2 c1) 1 -1))) (for/fold ((out with-v)) ((c (in-range c1 (+ c2 cstep) cstep))) (set-cell out r2 c color)))))) (let* ((order (at g 0 0)) (colors (filter (lambda (v) (not (= v 0))) (first-appearance-palette (set-cell g 0 0 0))))) (for/fold ((out g)) ((color (in-list colors))) (let ((cells (find-color g color))) (if (= (length cells) 2) (draw-l-path out color (first cells) (second cells) order) out))))))
Provenance
- Generator
- generators/d476983a3d6c/generator.py
- Notes and decisions
- generators/d476983a3d6c/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 80d94a6e64895839b4da9c63524f47d7ea1568fa2714a8f846933ccd166fb497
- Rule hash
- c83bfd047bef
- Sources
- bank:04c7711cefc4
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d476983a3d6c --count 1 --seed 20261108 --test 1