← 536de2f7591b · 5384b0fbe9e8 →
537b409b6744
A modal background contains a solid mover, a larger solid facing wall, and a farther same-side distractor. The nearest qualifying mover passes through the wall; its channel is erased from the wall, and the wall grows transversely around that channel. Output dimensions are unchanged.
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!
;; A small MOVER faces a wider solid WALL (nearest such pair wins,
;; bigger wall on ties). The mover teleports through: a doorway its
;; own width is cut through the wall, the wall grows sideways by half
;; the mover's size (at least 1), and the mover reappears flush on the
;; far side (or tucked inside when the wall hugs the grid edge).
(lambda (g)
(let ()
(define bg
(mode-list (for*/list ((r (range 0 h)) (c (range 0 w)))
(at g r c))))
(define objs (objects g bg))
(define (overlap? a1 a2 b1 b2) (and (<= a1 b2) (<= b1 a2)))
(define (put gg r c v)
(if (in-bounds? r c h w) (set-cell gg r c v) gg))
(define candidates ;; (gap wall-size dir mover wall)
(filter (lambda (x) x)
(for*/list ((m objs) (t objs) #:when (not (eq? m t)))
(and (solid-rect? t)
(cond ((and (> (obj-r1 t) (obj-r2 m))
(overlap? (obj-c1 m) (obj-c2 m)
(obj-c1 t) (obj-c2 t))
(> (obj-w t) (obj-w m)))
(list (- (obj-r1 t) (obj-r2 m) 1)
(obj-size t) 'down m t))
((and (> (obj-r1 m) (obj-r2 t))
(overlap? (obj-c1 m) (obj-c2 m)
(obj-c1 t) (obj-c2 t))
(> (obj-w t) (obj-w m)))
(list (- (obj-r1 m) (obj-r2 t) 1)
(obj-size t) 'up m t))
((and (> (obj-c1 t) (obj-c2 m))
(overlap? (obj-r1 m) (obj-r2 m)
(obj-r1 t) (obj-r2 t))
(> (obj-h t) (obj-h m)))
(list (- (obj-c1 t) (obj-c2 m) 1)
(obj-size t) 'right m t))
((and (> (obj-c1 m) (obj-c2 t))
(overlap? (obj-r1 m) (obj-r2 m)
(obj-r1 t) (obj-r2 t))
(> (obj-h t) (obj-h m)))
(list (- (obj-c1 m) (obj-c2 t) 1)
(obj-size t) 'left m t))
(else #f))))))
(define ranked
(sort candidates
(lambda (a b) (cond ((< (first a) (first b)) #t)
((> (first a) (first b)) #f)
(else (> (second a) (second b)))))))
(if (null? ranked)
g
(let* ((cand (first ranked))
(dir (third cand))
(m (fourth cand))
(t (fifth cand))
(m-cells (map (lambda (p)
(list (first p) (second p)
(at g (first p) (second p))))
(obj-cells m)))
(pad-v (max 1 (quotient (obj-w m) 2)))
(pad-h (max 1 (quotient (obj-h m) 2)))
(cleared (paint-cells g (obj-cells m) bg))
(paint-mover
(lambda (gg dr dc)
(for/fold ((out gg)) ((cv m-cells))
(put out (+ dr (- (first cv) (obj-r1 m)))
(+ dc (- (second cv) (obj-c1 m)))
(third cv))))))
(if (member? dir (list 'down 'up))
(let* ((cut ;; doorway through the wall, mover-wide
(for*/fold ((out cleared))
((r (range (obj-r1 t)
(+ (obj-r2 t) 1)))
(c (range (obj-c1 m)
(+ (obj-c2 m) 1))))
(put out r c bg)))
(grown ;; wall widens by pad-v on both flanks
(for*/fold ((out cut))
((r (range (obj-r1 t)
(+ (obj-r2 t) 1)))
(d (range 1 (+ pad-v 1))))
(put (put out r (- (obj-c1 t) d)
(obj-color t))
r (+ (obj-c2 t) d) (obj-color t))))
(dest-r (if (eq? dir 'up)
(max 0 (- (obj-r1 t) (obj-h m)))
(if (= (obj-r2 t) (- h 1))
(+ (- (obj-r2 t) (obj-h m)) 1)
(+ (obj-r2 t) 1)))))
(paint-mover grown dest-r (obj-c1 m)))
(let* ((cut
(for*/fold ((out cleared))
((r (range (obj-r1 m)
(+ (obj-r2 m) 1)))
(c (range (obj-c1 t)
(+ (obj-c2 t) 1))))
(put out r c bg)))
(grown
(for*/fold ((out cut))
((c (range (obj-c1 t)
(+ (obj-c2 t) 1)))
(d (range 1 (+ pad-h 1))))
(put (put out (- (obj-r1 t) d) c
(obj-color t))
(+ (obj-r2 t) d) c (obj-color t))))
(dest-c (if (eq? dir 'left)
(max 0 (- (obj-c1 t) (obj-w m)))
(if (= (obj-c2 t) (- w 1))
(+ (- (obj-c2 t) (obj-w m)) 1)
(+ (obj-c2 t) 1)))))
(paint-mover grown (obj-r1 m) dest-c))))))))Provenance
- Generator
- generators/537b409b6744/generator.py
- Notes and decisions
- generators/537b409b6744/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 61fe1c7026345bbfe8521c5b41576a8bda5a4695d037b84b255eb75461baa3ab
- Rule hash
- 7b81cecb3b71
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 537b409b6744 --count 1 --seed 20261108 --test 1