← aa14c6a9f111 · aa378df15340 →
aa2b217615f3
0-bg grid (h, w~7-14) with: (a) ONE FULL-LENGTH COLOR-2 (red) EDGE LINE on ONE of the 4 GRID EDGES (top row, bottom row, left col, or right col); (b) 3-5 CONNECTED COLORED OBJECTS in DISTINCT non-{0, 2} colors, each a 1-3 cell shape from a small bank, scattered in the INTERIOR (not touching the red line). Objects are placed at non-touching positions (1-cell 8-conn buffer). Rule (SLIDE OBJECTS TOWARD THE RED LINE, STACKING): DETECT the red line's EDGE → DIRECTION (up/down/left/right TOWARD the line). SORT objects by DISTANCE to the line (closest first). For EACH object in that order: SLIDE the entire object (as a rigid group) toward the line by max amount until it hits the RED LINE or a PREVIOUSLY-PLACED object's cells. The line stays. Net: objects stack against the red line in distance-order.
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! (lambda (g)
(let* ((h (rows g))
(w (cols g)))
(let* ((top-line? (for/and ((c (range 0 w))) (= (at g 0 c) 2)))
(bot-line? (for/and ((c (range 0 w))) (= (at g (- h 1) c) 2)))
(left-line? (for/and ((r (range 0 h))) (= (at g r 0) 2)))
(right-line? (for/and ((r (range 0 h))) (= (at g r (- w 1)) 2)))
(dir (cond
(top-line? 'up)
(bot-line? 'down)
(left-line? 'left)
(right-line? 'right)))
(non-2-objs (filter (lambda (o) (!= (obj-color o) 2)) (objects g 0)))
(sorted (sort non-2-objs
(lambda (a b)
(let ((aa (obj-bbox a))
(bb (obj-bbox b)))
(cond
((eq? dir 'up) (< (first aa) (first bb)))
((eq? dir 'down) (> (third aa) (third bb)))
((eq? dir 'left) (< (second aa) (second bb)))
(else (> (fourth aa) (fourth bb))))))))
(base (cellmap g (r c v) (if (= v 2) 2 0)))
(occupied (make-hash))
(_init (for ((r (range 0 h)))
(for ((c (range 0 w)))
(when (= (at g r c) 2) (hash-set! occupied (list r c) #t))))))
(for/fold ((out base))
((shape sorted))
(let* ((cells (obj-cells shape))
(cells-colored (map (lambda (c)
(list (first c)
(second c)
(at g (first c) (second c))))
cells))
(slide-d (let loop
((d 0))
(let* ((dr (cond
((eq? dir 'up) (- 0 (+ d 1)))
((eq? dir 'down) (+ d 1))
(else 0)))
(dc (cond
((eq? dir 'left) (- 0 (+ d 1)))
((eq? dir 'right) (+ d 1))
(else 0)))
(can-move (for/and ((c cells))
(let ((nr (+ (first c) dr))
(nc (+ (second c)
dc)))
(and
(>= nr 0)
(< nr h)
(>= nc 0)
(< nc w)
(not (hash-has-key? occupied
(list nr
nc))))))))
(cond (can-move (loop (+ d 1))) (else d)))))
(fdr (cond
((eq? dir 'up) (- 0 slide-d))
((eq? dir 'down) slide-d)
(else 0)))
(fdc (cond
((eq? dir 'left) (- 0 slide-d))
((eq? dir 'right) slide-d)
(else 0))))
(for/fold ((o out))
((cc cells-colored))
(let ((nr (+ (first cc) fdr))
(nc (+ (second cc) fdc))
(col (third cc)))
(hash-set! occupied (list nr nc) #t)
(set-cell o nr nc col)))))))))Provenance
- Generator
- generators/aa2b217615f3/generator.py
- Notes and decisions
- generators/aa2b217615f3/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 005b423a8f74efc1dc237121962de6fa9e445318bd91d0cacd72f952fb478a94
- Rule hash
- 5b3e7ca4f11c
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate aa2b217615f3 --count 1 --seed 20261108 --test 1