← 729429f8ea2c · 72a6d8b343e4 →

72a261e69372

Generate two or three distinct-color rectangular outlines with one color-1 marker assigned to every color role. Nested scenes require choosing the smallest intact enclosing outline. Overlap scenes draw a later intact frame across an earlier outline, so the earlier color is only an occluded frame fragment and its marker must remain 1.

frame hierarchynested containmentsmallest-enclosing 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).

Reference rule (Racket)

(rule! (let ((dummy 0)) (define (outline-cells r1 c1 r2 c2) (remove-duplicates (append (for/list ((c (in-range c1 (+ c2 1)))) (list r1 c)) (for/list ((c (in-range c1 (+ c2 1)))) (list r2 c)) (for/list ((r (in-range r1 (+ r2 1)))) (list r c1)) (for/list ((r (in-range r1 (+ r2 1)))) (list r c2))))) (define (rect-outline? obj) (let* ((r1 (obj-r1 obj)) (c1 (obj-c1 obj)) (r2 (obj-r2 obj)) (c2 (obj-c2 obj)) (cells (obj-cells obj)) (expected (outline-cells r1 c1 r2 c2))) (and (>= (- r2 r1) 2) (>= (- c2 c1) 2) (= (length cells) (length expected)) (all? (lambda (p) (member? p cells)) expected)))) (let* ((frames (filter rect-outline? (objects g 0))) (dots (find-color g 1))) (for/fold ((out g)) ((p (in-list dots))) (let* ((r (first p)) (c (second p)) (enclosing (filter (lambda (frame) (and (< (obj-r1 frame) r) (< r (obj-r2 frame)) (< (obj-c1 frame) c) (< c (obj-c2 frame)))) frames))) (if (empty? enclosing) out (let* ((chosen (first (sort enclosing (lambda (a b) (< (* (+ 1 (- (obj-r2 a) (obj-r1 a))) (+ 1 (- (obj-c2 a) (obj-c1 a)))) (* (+ 1 (- (obj-r2 b) (obj-r1 b))) (+ 1 (- (obj-c2 b) (obj-c1 b)))))))))) (set-cell out r c (obj-color chosen)))))))))

Provenance

Generator
generators/72a261e69372/generator.py
Notes and decisions
generators/72a261e69372/notes.md
Review label
reviewed_safe
Generator SHA-256
9c4b036b290524b61b2eecd93a3ae62d28813148d8f396acdd61cb1e4faf8af7
Rule hash
d763a0664108
Sources
bank:081996b60750
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 72a261e69372 --count 1 --seed 20261108 --test 1