← cf976dae6b92 · cfd0943c5b14 →
cfadc43e5098
Bridge midpoint-aligned same-color object boxes across their full gap and overlap interior, unless a third same-color box blocks the bridge.
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* ((objs (objects g 0))
(rects (map (lambda (o)
(let ((bb (obj-bbox o)))
(list (obj-color o)
(first bb)
(second bb)
(third bb)
(fourth bb))))
objs))
(n (length rects))
(bridges (for*/list ((i (range 0 n)) (j (range 0 n)) #:when (< i j))
(let* ((a (list-ref rects i))
(b (list-ref rects j))
(ac (first a))
(bc (first b)))
(cond
((!= ac bc) #f)
(else (let* ((ar1 (second a))
(ac1 (third a))
(ar2 (fourth a))
(ac2 (fifth a))
(br1 (second b))
(bc1 (third b))
(br2 (fourth b))
(bc2 (fifth b))
(ro-s (max ar1 br1))
(ro-e (min ar2 br2))
(co-s (max ac1 bc1))
(co-e (min ac2 bc2))
(row-ovlp (<= ro-s ro-e))
(col-ovlp (<= co-s co-e)))
(cond
((and
row-ovlp
(not col-ovlp)
(= (+ ar1 ar2) (+ br1 br2))) (let ((gap-c1 (if (< ac2 bc1)
(+ ac2 1)
(+ bc2 1)))
(gap-c2 (if (< ac2 bc1)
(- bc1 1)
(- ac1 1)))
(br1x (+ ro-s 1))
(br2x (- ro-e 1)))
(and
(and (<= br1x br2x) (<= gap-c1 gap-c2))
(list br1x gap-c1 br2x gap-c2 i j))))
((and
col-ovlp
(not row-ovlp)
(= (+ ac1 ac2) (+ bc1 bc2))) (let ((gap-r1 (if (< ar2 br1)
(+ ar2 1)
(+ br2 1)))
(gap-r2 (if (< ar2 br1)
(- br1 1)
(- ar1 1)))
(bc1x (+ co-s 1))
(bc2x (- co-e 1)))
(and
(and (<= bc1x bc2x) (<= gap-r1 gap-r2))
(list gap-r1 bc1x gap-r2 bc2x i j))))
(else #f))))))))
(valid-bridges (filter (lambda (x) x) bridges))
(unblocked (filter (lambda (br)
(let* ((r1x (first br))
(c1x (second br))
(r2x (third br))
(c2x (fourth br))
(bi (fifth br))
(bj (sixth br))
(color (first (list-ref rects bi))))
(not (for/or ((k (range 0 n)))
(and
(!= k bi)
(!= k bj)
(let* ((o (list-ref rects k))
(oc (first o))
(or1 (second o))
(oc1 (third o))
(or2 (fourth o))
(oc2 (fifth o)))
(and
(= oc color)
(<= (max or1 r1x)
(min or2 r2x))
(<= (max oc1 c1x)
(min oc2 c2x)))))))))
valid-bridges)))
(for/fold ((out g))
((br unblocked))
(let ((r1x (first br))
(c1x (second br))
(r2x (third br))
(c2x (fourth br)))
(for*/fold ((gg out))
((r (range r1x (+ r2x 1))) (c (range c1x (+ c2x 1))))
(set-cell gg r c 8))))))))Provenance
- Generator
- generators/cfadc43e5098/generator.py
- Notes and decisions
- generators/cfadc43e5098/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- e3465bcdcdcad8ad2bb616bc4301d69eb24a36b4bffbc7bce3dc771e5816cf04
- Rule hash
- b67b77ea3d2d
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate cfadc43e5098 --count 1 --seed 20261108 --test 1