← 21d822423cfc · 222de43cc4aa →
21eb0f467b5a
Complete the inclusive segment between each color's exactly two aligned cells; preserve non-pair, diagonal-pair and singleton colors.
parametric familyendpoint detectionsame-sizesegment completion
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 (paint-color out color)
(let ((cells (find-color g color)))
(if (not (= (length cells) 2))
(paint-cells out cells color)
(let* ((a (first cells))
(b (second cells))
(r1 (first a)) (c1 (second a))
(r2 (first b)) (c2 (second b)))
(cond [(= r1 r2)
(paint-cells out (for/list ([c (in-range (min c1 c2) (+ (max c1 c2) 1))]) (list r1 c)) color)]
[(= c1 c2)
(paint-cells out (for/list ([r (in-range (min r1 r2) (+ (max r1 r2) 1))]) (list r c1)) color)]
[else (paint-cells out cells color)])))))
(for/fold ([out (empty-grid (rows g) (cols g) 0)])
([color (in-list (grid-colors g 0))])
(paint-color out color))))Provenance
- Generator
- generators/21eb0f467b5a/generator.py
- Notes and decisions
- generators/21eb0f467b5a/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- fb9bb01e42e6b29c99feb4ee42b753873155d41a37c7da41fa153116d9066f1f
- Rule hash
- 91f9e86ee830
- Sources
- bank:6905604d1760
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 21eb0f467b5a --count 1 --seed 20261108 --test 1