← 75ba893e1e36 · 75c10ce4046c →
75be7448827f
Two or three hollow color-1 frames; crop the unique raw-count winner. Alternating examples refute both density and frame-area shortcuts.
parametric familycropped outputinterior countingmulti-frame selection
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 (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (f14-same-cells? a b) (and (= (length a) (length b)) (all? (lambda (p) (member? p b)) a))) (define (f14-border-cells r0 c0 r1 c1) (for*/list ((r (in-range r0 (+ r1 1))) (c (in-range c0 (+ c1 1))) #:when (or (= r r0) (= r r1) (= c c0) (= c c1))) (list r c))) (define (f4-norm cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb))) (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) cells))) (define (f4-norm-info cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb)) (r1 (third bb)) (c1 (fourth bb))) (list (f4-norm cells) (+ 1 (- r1 r0)) (+ 1 (- c1 c0))))) (define (f4-rect-frame? cells) (let* ((info (f4-norm-info cells)) (norm (first info)) (h (second info)) (w (third info)) (border (f14-border-cells 0 0 (- h 1) (- w 1)))) (and (>= h 3) (>= w 3) (f14-same-cells? norm border)))) (define (s7b-frame-boxes grid color) (map obj-bbox (sort (filter (lambda (obj) (and (= (obj-color obj) color) (f4-rect-frame? (obj-cells obj)))) (objects grid 0)) (lambda (a b) (e8b-list< (obj-bbox a) (obj-bbox b)))))) (define (s7b-inside box) (list (+ (first box) 1) (+ (second box) 1) (- (third box) 1) (- (fourth box) 1))) (define (s7b-crop-box grid box) (subgrid grid (first box) (second box) (third box) (fourth box))) (define (s7b-count-nonzero-in-box grid box) (count-where (lambda (p) (not (= (at grid (first p) (second p)) 0))) (positions-in-rect (first box) (second box) (third box) (fourth box)))) (define (s7b-largest-by-count boxes counts) (let loop ((rest-boxes boxes) (rest-counts counts) (best (first boxes)) (best-count (first counts))) (if (empty? rest-boxes) best (if (> (first rest-counts) best-count) (loop (rest rest-boxes) (rest rest-counts) (first rest-boxes) (first rest-counts)) (loop (rest rest-boxes) (rest rest-counts) best best-count))))) (let* ((boxes (s7b-frame-boxes g 1)) (interiors (map s7b-inside boxes)) (counts (map (lambda (box) (s7b-count-nonzero-in-box g box)) interiors)) (best (s7b-largest-by-count interiors counts))) (s7b-crop-box g best))))
Provenance
- Generator
- generators/75be7448827f/generator.py
- Notes and decisions
- generators/75be7448827f/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 010cb74c9da2d7832b302c403f834c84a85746eaf245c65c61bc30d5a28866cb
- Rule hash
- 6f03f2e69da2
- Sources
- bank:50e2f7e22580
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 75be7448827f --count 1 --seed 20261108 --test 1