← 0ed4fa8c0b40 · 0ee358bd9d75 →
0ee26bf68bad
Select the largest monochromatic 4-connected component by cell count; retain cells with an absent cardinal neighbor and crop to its bbox.
contoursobjectsoutput_resizeselection
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 (paint grid cells color) (for/fold ((out grid)) ((p (in-list cells))) (if (in-bounds? (first p) (second p) (rows out) (cols out)) (set-cell out (first p) (second p) color) out))) (define (contour-cells obj) (filter (lambda (p) (any? (lambda (d) (not (member? (list (+ (first p) (first d)) (+ (second p) (second d))) (obj-cells obj)))) dirs4)) (obj-cells obj))) (define (contour-shape obj) (let* ((bb (obj-bbox obj)) (h (+ 1 (- (third bb) (first bb)))) (w (+ 1 (- (fourth bb) (second bb))))) (paint (empty-grid h w 0) (map (lambda (p) (list (- (first p) (first bb)) (- (second p) (second bb)))) (contour-cells obj)) (obj-color obj)))) (let* ((obj (first (sort (objects g 0) (lambda (a b) (cond ((not (= (obj-size a) (obj-size b))) (> (obj-size a) (obj-size b))) ((not (= (obj-r1 a) (obj-r1 b))) (< (obj-r1 a) (obj-r1 b))) (else (< (obj-c1 a) (obj-c1 b))))))))) (contour-shape obj))))
Provenance
- Generator
- generators/0ee26bf68bad/generator.py
- Notes and decisions
- generators/0ee26bf68bad/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 92caaf858ae07f4d83f9d097870d1b21b809fedc0c54478ba77c85984b790717
- Rule hash
- d66e3a1b4a29
- Sources
- bank:1e836b938cf4
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 0ee26bf68bad --count 1 --seed 20261108 --test 1