← b83ad00fc681 · b87dcd3011b1 →
b86607f34b8b
Rows 0/1 map colors to modes above a color-9 divider: 1 closes rows, 2 closes columns, 3 closes rows THEN columns ONCE, and 4 keeps only new row bridges, erasing its seeds. Rebuild the scene from original color supports; overlaps prefer mode 1 > 3 > 2 > 4, then the larger color.
legend parsingmixed outputsper-color transformation library
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 (points-of grid color) (sort (find-color grid color) cell<)) (define (row-close cells) (remove-duplicates (flatmap (lambda (r) (let* ((cols (sort (map second (filter (lambda (p) (= (first p) r)) cells)) <))) (if (empty? cols) (list) (for/list ((c (in-range (first cols) (+ (last cols) 1)))) (list r c))))) (remove-duplicates (map first cells))))) (define (col-close cells) (remove-duplicates (flatmap (lambda (c) (let* ((rs (sort (map first (filter (lambda (p) (= (second p) c)) cells)) <))) (if (empty? rs) (list) (for/list ((r (in-range (first rs) (+ (last rs) 1)))) (list r c))))) (remove-duplicates (map second cells))))) (define (double-close cells) (col-close (row-close cells))) (define (bridge-only cells) (filter (lambda (p) (not (member p cells))) (row-close cells))) (define sep-row (first (filter (lambda (r) (all? (lambda (c) (= (at g r c) 9)) (range 0 (cols g)))) (range 0 (rows g))))) (define legend (filter (lambda (entry) (not (= (first entry) 0))) (for/list ((c (in-range (cols g)))) (list (at g 0 c) (at g 1 c))))) (define painted (flatmap (lambda (entry) (let* ((color (first entry)) (mode (second entry)) (priority (cond ((= mode 1) 3) ((= mode 3) 2) ((= mode 2) 1) (else 0))) (cells (filter (lambda (p) (> (first p) sep-row)) (points-of g color))) (closed (cond ((= mode 1) (row-close cells)) ((= mode 2) (col-close cells)) ((= mode 3) (double-close cells)) (else (bridge-only cells))))) (map (lambda (p) (list (first p) (second p) color priority)) closed))) legend)) (grid-from-fn (rows g) (cols g) (lambda (r c) (if (<= r sep-row) (at g r c) (let ((hits (filter (lambda (cell) (and (= (first cell) r) (= (second cell) c))) painted))) (if (empty? hits) 0 (third (first (sort hits (lambda (a b) (if (= (fourth a) (fourth b)) (> (third a) (third b)) (> (fourth a) (fourth b))))))))))))))
Provenance
- Generator
- generators/b86607f34b8b/generator.py
- Notes and decisions
- generators/b86607f34b8b/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- be164d9a707bba60eb2bea2e2d4e5d6477a90f5601afd4eaeacb881bdebdbe34
- Rule hash
- 6fa3fd6234a8
- Sources
- bank:129d068bbf4e
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate b86607f34b8b --count 1 --seed 20261108 --test 1