← 5c577e82a07f · 5ca74a85bc85 →
5c9fd75979d1
Find nonzero 4-connected objects whose bounding-box area exceeds two. Use all retained bounding-box top/bottom and left/right edges to define a slot grid, read the covering object's color in every slot, and reverse the slot-matrix columns.
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* ((objs (objects g 0))
(rects (filter (lambda (o)
(let* ((bb (obj-bbox o))
(bh (+ 1 (- (third bb) (first bb))))
(bw (+ 1 (- (fourth bb) (second bb)))))
(> (* bh bw) 2)))
objs))
(rect-list (map (lambda (o)
(let ((bb (obj-bbox o)))
(list (obj-color o)
(first bb)
(second bb)
(third bb)
(fourth bb))))
rects))
(row-breaks (remove-duplicates (sort (apply append
(map (lambda (r)
(list (second r)
(+ 1
(fourth r))))
rect-list))
<)))
(col-breaks (remove-duplicates (sort (apply append
(map (lambda (r)
(list (third r)
(+ 1
(fifth r))))
rect-list))
<)))
(row-groups (for/list ((i (range 0 (- (length row-breaks) 1))))
(list (list-ref row-breaks i)
(- (list-ref row-breaks (+ i 1)) 1))))
(col-slots (for/list ((i (range 0 (- (length col-breaks) 1))))
(list (list-ref col-breaks i)
(- (list-ref col-breaks (+ i 1)) 1))))
(num-rows (length row-groups))
(num-cols (length col-slots))
(find-color (lambda (rg-r1 rg-r2 cs-c1 cs-c2)
(let loop
((rs rect-list))
(cond
((null? rs) 0)
(else (let* ((r (car rs))
(r1 (second r))
(c1 (third r))
(r2 (fourth r))
(c2 (fifth r)))
(if (and
(<= r1 rg-r1)
(>= r2 rg-r2)
(<= c1 cs-c1)
(>= c2 cs-c2))
(first r)
(loop (cdr rs))))))))))
(build-grid num-rows
num-cols
(r c)
(let* ((slot-idx (- num-cols 1 c))
(rg (list-ref row-groups r))
(cs (list-ref col-slots slot-idx)))
(find-color (first rg) (second rg) (first cs) (second cs))))))))Provenance
- Generator
- generators/5c9fd75979d1/generator.py
- Notes and decisions
- generators/5c9fd75979d1/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 61da65c1b65ccd8c70c6ce900e9c5fe8b21c06d6c5b23ab98f15b893f46413b1
- Rule hash
- 36b024575e05
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5c9fd75979d1 --count 1 --seed 20261108 --test 1