← 0bb8813a21dc · 0be8ff9b4144 →
0bd65c18b34c
On the demonstrated compact or 30x30 scene, move each blue dot only when it shares a row or column with its nearest exact 2x2 red square. The dot teleports to hug that square; unaligned dots stay, and a two-square distance tie uses the first square in row-major order.
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)))
(begin
(define all-pos
(flatmap (lambda (r) (map (lambda (c) (list r c)) (range 0 (- w 1))))
(range 0 (- h 1))))
(define squares
(filter (lambda (rc)
(let ((r (first rc))
(c (second rc)))
(and
(= (at g r c) 2)
(= (at g (+ r 1) c) 2)
(= (at g r (+ c 1)) 2)
(= (at g (+ r 1) (+ c 1)) 2))))
all-pos))
(define (cheby-dist br bc sr sc)
(let ((dr (max 0 (max (- sr br) (- br (+ sr 1)))))
(dc (max 0 (max (- sc bc) (- bc (+ sc 1))))))
(max dr dc)))
(define (nearest-sq br bc)
(reduce (lambda (best sq)
(let ((d (cheby-dist br bc (first sq) (second sq))))
(if (< d (first best)) (list d sq) best)))
(let ((sq (first squares)))
(list (cheby-dist br bc (first sq) (second sq)) sq))
(cdr squares)))
(define (target br bc)
(let* ((nb (nearest-sq br bc))
(sq (second nb))
(sr (first sq))
(sc (second sq))
(row-aligned (and (>= br sr) (<= br (+ sr 1))))
(col-aligned (and (>= bc sc) (<= bc (+ sc 1)))))
(cond
(row-aligned (if (< bc sc) (list br (- sc 1)) (list br (+ sc 2))))
(col-aligned (if (< br sr) (list (- sr 1) bc) (list (+ sr 2) bc)))
(else (list br bc)))))
(define blues (find-color g 1))
(define cleared (recolor-cells g blues 0))
(reduce (lambda (gg b)
(let ((t (target (first b) (second b))))
(set-cell gg (first t) (second t) 1)))
cleared
blues)))))Provenance
- Generator
- generators/0bd65c18b34c/generator.py
- Notes and decisions
- generators/0bd65c18b34c/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- f9e74f2b1216ef76ee0ae0bf5189c6c7a8068b234334fb0df9ff559a12a738aa
- Rule hash
- 9cd282956b9a
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 0bd65c18b34c --count 1 --seed 20261108 --test 1