← 7a6e065e8273 · 7aee010af40d →

7aed1f233b46

A canonical-scale zero-background grid contains three sparse colored candidates. Row-close then column-close each color independently; exactly one closure is a full rectangle. Output that rectangle as a tight cyan crop.

counterfactual shape testcropped outputdouble closure

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 (bbox-cells cells) (let ((bb (bbox-of-cells cells))) (positions-in-rect (first bb) (second bb) (third bb) (fourth bb)))) (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 (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 (rectangle-cells? cells) (equal? (sort cells cell<) (sort (bbox-cells cells) cell<))) (let* ((infos (map (lambda (color) (let ((closed (double-close (points-of g color)))) (list color closed))) (grid-colors g 0))) (chosen (first (filter (lambda (info) (rectangle-cells? (second info))) infos)))) (crop-cells (second chosen) 8))))

Provenance

Generator
generators/7aed1f233b46/generator.py
Notes and decisions
generators/7aed1f233b46/notes.md
Review label
reviewed_safe
Generator SHA-256
8611cbb884c2babafac47be4e66e6ed1d96f42fee51c2da02143b41e4723d3ea
Rule hash
20b242594e4b
Sources
bank:129d068bbf4e
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 7aed1f233b46 --count 1 --seed 20261108 --test 1