← cc100a8ad437 · cc74d7392ecd →
cc4d8d3dc442
Color-5 walls bound four-connected regions. A regular 2-3 by 2-3 lattice is refined by 1-3 local wall segments, so some nominal cells split into smaller regions as in the canonical examples. Each region contains 0-4 color-2 keys. The whole non-wall region, including its keys, becomes 0 for zero keys, 8 for an odd count, or 7 for a positive even count. Profiles deliberately include 3- and 4-key regions to separate parity from the canonical-compatible one-versus-many shortcut.
conditional chamber fillflood fillregion counting
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 dirs4 (list (list -1 0) (list 1 0) (list 0 -1) (list 0 1))) (define (t10-open-region grid start walls) (let bfs ((queue (list start)) (seen (list start)) (cells (list))) (if (empty? queue) (reverse cells) (let* ((cur (first queue)) (nbrs (filter (lambda (p) (and (in-bounds? (first p) (second p) (rows grid) (cols grid)) (not (member? p seen)) (not (member? (at grid (first p) (second p)) walls)))) (map (lambda (d) (list (+ (first cur) (first d)) (+ (second cur) (second d)))) dirs4)))) (bfs (append (rest queue) nbrs) (append seen nbrs) (cons cur cells)))))) (for*/fold ((out (paint-cells (empty-grid (rows g) (cols g) 0) (find-color g 5) 5))) ((r (in-range (rows g))) (c (in-range (cols g)))) (if (= (at g r c) 5) out (let* ((region (t10-open-region g (list r c) (list 5))) (keys (count-where (lambda (p) (= (at g (first p) (second p)) 2)) region)) (fill (cond ((= keys 0) 0) ((odd? keys) 8) (else 7)))) (paint-cells out region fill))))))
Provenance
- Generator
- generators/cc4d8d3dc442/generator.py
- Notes and decisions
- generators/cc4d8d3dc442/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 6f3208ca9f69aa2bd620870b5c288d1f4b6a9914cbf34bf30c2fab72133fd4e4
- Rule hash
- cdefe31a4be3
- Sources
- bank:0e3c36a9dbcc
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate cc4d8d3dc442 --count 1 --seed 20261108 --test 1