← 03478139591b · 03909f3e98e7 →
038f266f3acf
A zero-background grid contains two or three separated solid green(3) rectangles. Each rectangle has exactly one red(2) non-corner rim cell. For every red marker independently, project a red centre ray away from its rectangle to the grid edge and paint green side wings whose half-width equals the distance from the marker to the opposite rectangle edge.
parametric family
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!
;; Each red(2) cell sits on the rim of a blob cluster. It fires AWAY
;; from the cluster: a red ray to the grid edge, flanked at every step
;; by green(3) wings as wide as the cluster's span on the launch axis.
;; The cluster box is grown by alternating row/column sweeps before
;; reading which rim the red cell occupies.
(lambda (g)
(let ()
(define (grow start step good?) ;; slide while the NEXT spot is good
(let loop ((k start))
(if (good? (+ k step)) (loop (+ k step)) k)))
(define (launch out rr cc)
(let* ((r1 (grow rr -1 (lambda (k) (and (>= k 0)
(not (zero? (at g k cc)))))))
(r2 (grow rr 1 (lambda (k) (and (< k h)
(not (zero? (at g k cc)))))))
(c1 (grow cc -1 (lambda (k) (and (>= k 0)
(not (zero? (at g rr k)))))))
(c2 (grow cc 1 (lambda (k) (and (< k w)
(not (zero? (at g rr k)))))))
(c1f (grow c1 -1
(lambda (k)
(and (>= k 0)
(any? (lambda (kr)
(not (zero? (at g kr k))))
(range r1 (+ r2 1)))))))
(c2f (grow c2 1
(lambda (k)
(and (< k w)
(any? (lambda (kr)
(not (zero? (at g kr k))))
(range r1 (+ r2 1)))))))
(r1f (grow r1 -1
(lambda (k)
(and (>= k 0)
(any? (lambda (kc)
(not (zero? (at g k kc))))
(range c1f (+ c2f 1)))))))
(r2f (grow r2 1
(lambda (k)
(and (< k h)
(any? (lambda (kc)
(not (zero? (at g k kc))))
(range c1f (+ c2f 1)))))))
(fdr (cond ((= rr r1f) -1) ((= rr r2f) 1) (else 0)))
(fdc (cond ((= cc c1f) -1) ((= cc c2f) 1) (else 0)))
(dr (if (zero? fdc) fdr 0))
(dc (if (zero? fdr) fdc 0)))
(if (and (zero? dr) (zero? dc))
out
(let ((half (cond ((= dc -1) (- c2f cc))
((= dc 1) (- cc c1f))
((= dr -1) (- r2f rr))
(else (- rr r1f)))))
(let ext ((er (+ rr dr)) (ec (+ cc dc)) (acc out))
(if (not (in-bounds? er ec h w))
acc
(ext (+ er dr) (+ ec dc)
(for/fold ((a2 (set-cell acc er ec 2)))
((k (range 1 (+ half 1))))
(let* ((p1 (if (zero? dr)
(list (- er k) ec)
(list er (- ec k))))
(p2 (if (zero? dr)
(list (+ er k) ec)
(list er (+ ec k))))
(a3 (if (in-bounds? (first p1)
(second p1) h w)
(set-cell a2 (first p1)
(second p1) 3)
a2)))
(if (in-bounds? (first p2) (second p2)
h w)
(set-cell a3 (first p2) (second p2)
3)
a3))))))))))
(for*/fold ((out g)) ((rr (range 0 h)) (cc (range 0 w)))
(if (= (at g rr cc) 2) (launch out rr cc) out)))))Provenance
- Generator
- generators/038f266f3acf/generator.py
- Notes and decisions
- generators/038f266f3acf/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 757b638f0a04782eef38b90eb94359316fc5c3404914c5ee854d54eb4f8445ad
- Rule hash
- 3d0748ee02cc
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 038f266f3acf --count 1 --seed 20261108 --test 1