← 5000bcb83fa9 · 50385c1a773f →

501c7f0770eb

A zero-background grid contains either two isolated rectangular gray(5) chambers or three visible rectangles where two touch and merge into one non-rectangular component. Only connected color-5 components that are exact rectangle borders are active. In each active chamber, blue(1) emits a vertical orange(7) ray and red(2) a horizontal ray; gray walls and yellow(4) blockers stop the ray. Seeds and blockers inside the malformed touching pair stay unchanged.

internal blockersinvented primitive: ray_until_blocklocal frame decomposition

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 (e8-cell<? a b) (or (< (first a) (first b)) (and (= (first a) (first b)) (< (second a) (second b))))) (define (e8-rect-border? obj) (let* ((bb (obj-bbox obj)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (border (filter (lambda (p) (or (= (first p) r1) (= (first p) r2) (= (second p) c1) (= (second p) c2))) (positions-in-rect r1 c1 r2 c2)))) (equal? (sort (obj-cells obj) e8-cell<?) (sort border e8-cell<?)))) (define (e5b-ray grid r c dr dc blockers include-start bounds) (let ((start-cells (if include-start (if (or (not bounds) (and (<= (first bounds) r) (<= r (third bounds)) (<= (second bounds) c) (<= c (fourth bounds)))) (list (list r c)) (list)) (list)))) (let loop ((rr (+ r dr)) (cc (+ c dc)) (acc start-cells)) (cond ((not (in-bounds? rr cc (rows grid) (cols grid))) acc) ((and bounds (not (and (<= (first bounds) rr) (<= rr (third bounds)) (<= (second bounds) cc) (<= cc (fourth bounds))))) acc) ((member? (at grid rr cc) blockers) acc) (else (loop (+ rr dr) (+ cc dc) (append acc (list (list rr cc))))))))) (for/fold ((out g)) ((frame (in-list (filter e8-rect-border? (filter (lambda (obj) (= (obj-color obj) 5)) (objects g 0)))))) (let* ((bb (obj-bbox frame)) (bounds (list (+ (first bb) 1) (+ (second bb) 1) (- (third bb) 1) (- (fourth bb) 1))) (inside (positions-in-rect (first bounds) (second bounds) (third bounds) (fourth bounds))) (seeds (filter (lambda (p) (member? (at g (first p) (second p)) (list 1 2))) inside))) (for/fold ((acc out)) ((seed (in-list seeds))) (let* ((v (at g (first seed) (second seed))) (cells (if (= v 2) (append (e5b-ray g (first seed) (second seed) 0 1 (list 4 5) #t bounds) (e5b-ray g (first seed) (second seed) 0 -1 (list 4 5) #f bounds)) (append (e5b-ray g (first seed) (second seed) 1 0 (list 4 5) #t bounds) (e5b-ray g (first seed) (second seed) -1 0 (list 4 5) #f bounds))))) (paint-cells acc (remove-duplicates cells) 7)))))))

Provenance

Generator
generators/501c7f0770eb/generator.py
Notes and decisions
generators/501c7f0770eb/notes.md
Review label
reviewed_safe
Generator SHA-256
a7b747ac99b15297f8f23ca7b03b165e8b89e79f34757e86005dcd89fb7ab315
Rule hash
a850cef9c1ff
Sources
bank:61554c4a7bfb
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 501c7f0770eb --count 1 --seed 20261108 --test 1