← d5178d26d905 · d552baa9e49e →

d53534afb2ff

One or two exact hollow rectangular frames recolor every connected object strictly inside them; same-color objects outside remain unchanged.

bbox nestingcontainmentrecolor by enclosure

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).

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-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 (v0-strictly-contains? frame obj) (let ((fb (obj-bbox frame)) (ob (obj-bbox obj))) (and (< (first fb) (first ob)) (< (second fb) (second ob)) (< (third ob) (third fb)) (< (fourth ob) (fourth fb))))) (define (v2-exact-rect-outline? obj) (let* ((bb (obj-bbox obj)) (r0 (first bb)) (c0 (second bb)) (r1 (third bb)) (c1 (fourth bb)) (expected (sort (f14-border-cells r0 c0 r1 c1) e8b-list<)) (cells (sort (obj-cells obj) e8b-list<))) (and (>= (- r1 r0) 2) (>= (- c1 c0) 2) (equal? cells expected)))) (let* ((objs (objects g 0)) (rings (filter v2-exact-rect-outline? objs)) (others (filter (lambda (obj) (not (v2-exact-rect-outline? obj))) objs))) (for/fold ((out g)) ((obj (in-list others))) (let ((hits (filter (lambda (ring) (v0-strictly-contains? ring obj)) rings))) (if (empty? hits) out (paint-cells out (obj-cells obj) (obj-color (first hits)))))))))

Provenance

Generator
generators/d53534afb2ff/generator.py
Notes and decisions
generators/d53534afb2ff/notes.md
Review label
reviewed_safe
Generator SHA-256
fda9a23aa329d4f01f737dcdf484ca998da3320b3215e1c4f911ca7e2c9c149a
Rule hash
372b08419c67
Sources
bank:eb9f9fbbbec1
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate d53534afb2ff --count 1 --seed 20261108 --test 1