← 6145142974ff · 616a5c01a7ea →

615496fbe17b

One object has a single small enclosed hole that a 3x3 dilation seals (a solid rectangle minus one interior cell); the rest are solid. The rule outputs the halo-sealed object cropped, colour 8. The holed shape and its size vary.

parametric familyhole countingselection by after-minus-before behaviortopological effect of dilation

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 square-offsets (for*/list ((dr (in-range -1 2)) (dc (in-range -1 2))) (list dr dc))) (define (grow-from-centers grid centers offsets) (remove-duplicates (filter (lambda (p) (in-bounds? (first p) (second p) (rows grid) (cols grid))) (flatmap (lambda (p) (map (lambda (d) (list (+ (first p) (first d)) (+ (second p) (second d)))) offsets)) centers)))) (define (crop-cells cells (color 8)) (let* ((bb (bbox-of-cells cells)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (norm (map (lambda (p) (list (- (first p) r1) (- (second p) c1))) cells))) (paint-cells (empty-grid (+ 1 (- r2 r1)) (+ 1 (- c2 c1)) 0) norm color))) (define (obj< a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (if (= (first ba) (first bb)) (< (second ba) (second bb)) (< (first ba) (first bb))))) (define (holes-in-cells cells) (let* ((sub (crop-cells cells 2)) (regions (find-0-regions sub 0))) (count-where (lambda (region) (not (any? (lambda (p) (or (= (first p) 0) (= (second p) 0) (= (first p) (- (rows sub) 1)) (= (second p) (- (cols sub) 1)))) region))) regions))) (let* ((objs (sort (objects g 0) obj<)) (chosen (first (filter (lambda (obj) (> (holes-in-cells (obj-cells obj)) (holes-in-cells (grow-from-centers g (obj-cells obj) square-offsets)))) objs)))) (crop-cells (obj-cells chosen) 8))))

Provenance

Generator
generators/615496fbe17b/generator.py
Notes and decisions
generators/615496fbe17b/notes.md
Review label
reviewed_safe
Generator SHA-256
d4a0a8cd9da41bb8936d9fdeb1742f46782b65b1abf0dbf77a2d607004d87fd4
Rule hash
da4b18e40895
Sources
bank:1f065edbcf08
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 615496fbe17b --count 1 --seed 20261108 --test 1