← d59da25908ca · d5af7195f6da →
d5a059b0f3a6
Detect rectangles from four L-corners, mirror each enclosed blue motif across its missing axis, and remove blue distractors outside frames.
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! (lambda (g) (let* ((h (rows g)) (w (cols g))) (let* ((fcolor (find-first (lambda (c) (and (!= c 0) (!= c 1))) (grid-colors g))) (comps (objects (keep-only g fcolor) 0)) (corners (map (lambda (o) (let* ((cells (obj-cells o)) (elbow (find-first (lambda (p) (= 2 (count-if (lambda (q) (= 1 (+ (abs (- (first p) (first q))) (abs (- (second p) (second q)))))) cells))) cells)) (er (first elbow)) (ec (second elbow)) (armh (find-first (lambda (p) (and (= (first p) er) (!= (second p) ec))) cells)) (armv (find-first (lambda (p) (and (= (second p) ec) (!= (first p) er))) cells)) (dh (if (> (second armh) ec) 1 -1)) (dv (if (> (first armv) er) 1 -1))) (list dv dh er ec))) comps)) (tls (filter (lambda (c) (and (= (first c) 1) (= (second c) 1))) corners)) (frames (map (lambda (tl) (let* ((r1 (third tl)) (c1 (fourth tl)) (tr (find-first (lambda (c) (and (= (first c) 1) (= (second c) -1) (= (third c) r1))) corners)) (bl (find-first (lambda (c) (and (= (first c) -1) (= (second c) 1) (= (fourth c) c1))) corners))) (list r1 c1 (third bl) (fourth tr)))) tls)) (bluecells (flatmap (lambda (fr) (let* ((r1 (first fr)) (c1 (second fr)) (r2 (third fr)) (c2 (fourth fr)) (seed (filter (lambda (p) (and (>= (first p) r1) (<= (first p) r2) (>= (second p) c1) (<= (second p) c2))) (find-color g 1))) (allcols (map second seed)) (cc (+ c1 c2)) (cr (+ r1 r2)) (leftonly (andmap (lambda (c) (< c (/ cc 2.0))) allcols)) (rightonly (andmap (lambda (c) (> c (/ cc 2.0))) allcols)) (mirrored (if (or leftonly rightonly) (map (lambda (p) (list (first p) (- cc (second p)))) seed) (map (lambda (p) (list (- cr (first p)) (second p))) seed)))) (append seed mirrored))) frames)) (base (keep-only g fcolor))) (recolor-cells base bluecells 1)))))
Provenance
- Generator
- generators/d5a059b0f3a6/generator.py
- Notes and decisions
- generators/d5a059b0f3a6/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 8276303d89c43e360a4990344a3ccf04a0321e0b490aaa4300c36e3d0c86975d
- Rule hash
- 77f0ca66f33e
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d5a059b0f3a6 --count 1 --seed 20261108 --test 1