← 14c5c68b0201 · 151f4dc0c08f →

14dacb3b518f

Separated color-6 objects on a 0 background. Recolor each 4-connected object by topology: one or more enclosed holes -> 8; no enclosed holes -> 2. Scheduled examples include non-frame and multi-hole positives, leaky C-shaped negatives, and large hole-free negatives.

parametric familyconnected componentsrecoloringtopology

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 (nonzero-cells grid) (filter (lambda (p) (not (= (at grid (first p) (second p)) 0))) (grid-positions grid))) (define (crop-nonzero grid) (let ((cells (nonzero-cells grid))) (if (empty? cells) (list (list 0)) (let* ((bb (bbox-of-cells cells))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))))) (define (f14b-binary-crop grid) (crop-nonzero (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 1))))) (define (f14b-hole-count grid) (let* ((binary (f14b-binary-crop grid)) (regions (find-0-regions binary 0))) (length (filter (lambda (region) (not (any? (lambda (p) (or (= (first p) 0) (= (first p) (- (rows binary) 1)) (= (second p) 0) (= (second p) (- (cols binary) 1)))) region))) regions)))) (define (s17b-object-crop grid obj) (let ((bb (obj-bbox obj))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((obj (in-list (objects g 0)))) (paint-cells out (obj-cells obj) (if (>= (f14b-hole-count (s17b-object-crop g obj)) 1) 8 2)))))

Provenance

Generator
generators/14dacb3b518f/generator.py
Notes and decisions
generators/14dacb3b518f/notes.md
Review label
reviewed_safe
Generator SHA-256
60d817465de0aa5552e054895a50a584f2f4f4aaac5a99057dea7bb50b929121
Rule hash
fe78a969401a
Sources
bank:f716aa11d181
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 14dacb3b518f --count 1 --seed 20261108 --test 1