← 57799de7f990 · 5782a1f38509 →
577d2db13443
On a 6x12 black grid, find every maximal same-color horizontal nonzero run independently. Recolor its left and right endpoints to 1, including singleton and length-two runs, while preserving every longer interior cell.
parametric familylocal recolorrow-wise processingrun detection
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).
Reference rule (Racket)
(rule! (let ((dummy 0)) (define (row-run r start end color) (list r start end (+ 1 (- end start)) color (for/list ((c (in-range start (+ end 1)))) (list r c)))) (define (run-line run) (first run)) (define (run-start run) (second run)) (define (run-end run) (third run)) (define (row-runs grid) (apply append (for/list ((r (in-range (rows grid)))) (let loop ((c 0) (acc (list))) (if (>= c (cols grid)) (reverse acc) (let ((v (at grid r c))) (if (= v 0) (loop (+ c 1) acc) (let find-end ((cc c)) (if (and (< (+ cc 1) (cols grid)) (= (at grid r (+ cc 1)) v)) (find-end (+ cc 1)) (loop (+ cc 1) (cons (row-run r c cc v) acc))))))))))) (for/fold ((out g)) ((run (in-list (row-runs g)))) (set-cell (set-cell out (run-line run) (run-start run) 1) (run-line run) (run-end run) 1))))
Provenance
- Generator
- generators/577d2db13443/generator.py
- Notes and decisions
- generators/577d2db13443/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 806f53221ad5dca44db6230fcadb9d0b8606f954126206d5adf194008c18a23a
- Rule hash
- a811558a15fb
- Sources
- bank:647beeb937e1
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 577d2db13443 --count 1 --seed 20261108 --test 1