← public_eval_221dfab4 · public_eval_269e22fb →
public_eval_247ef758
Match opposite frame markers and center each source template on all crossings.
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!
;; A uniform nonzero separator divides a template palette from a marked frame.
;; Match BOTH opposite frame edges for a source color, on each coordinate axis.
;; Center the source's occupied bounding box on EVERY row/column intersection.
;; Remove only matched source templates. Preserve frame and nonzero overlap cells.
;; Earlier source templates win.
(lambda (g)
(let ()
(define sep (for/first ((c (range 0 w)) #:when (and (> (at g 0 c) 0) (col-uniform? g c))) c))
(define left (+ sep 1))
(define colors (remove-duplicates
(for*/list ((r (range 0 h)) (c (range 0 sep)) #:when (> (at g r c) 0)) (at g r c))))
(define records
(filter (lambda (part) (and (not (null? (list-ref part 4))) (not (null? (list-ref part 5)))))
(for/list ((color colors))
(let* ((cells (for*/list ((r (range 0 h)) (c (range 0 sep)) #:when (= (at g r c) color)) (list r c)))
(box (bbox-of-cells cells))
(rs (for/list ((r (range 1 (- h 1))) #:when (and (= (at g r left) color) (= (at g r (- w 1)) color))) r))
(cs (for/list ((c (range (+ left 1) (- w 1))) #:when (and (= (at g 0 c) color) (= (at g (- h 1) c) color))) c)))
(list color cells (quotient (+ (first box) (third box)) 2)
(quotient (+ (second box) (fourth box)) 2) rs cs (length cells)
(* (+ 1 (- (third box) (first box))) (+ 1 (- (fourth box) (second box)))))))))
(define ordered records)
(define cleared (for/fold ((out g)) ((part records)) (erase-cells out (second part) 0)))
(for/fold ((out cleared)) ((part ordered))
(for*/fold ((canvas out)) ((rr (list-ref part 4)) (cc (list-ref part 5)) (p (second part)))
(let ((r (+ rr (- (first p) (third part)))) (c (+ cc (- (second p) (fourth part)))))
(if (and (in-bounds? r c h w) (>= c left) (= (safe-at canvas r c -1) 0))
(set-cell canvas r c (first part)) canvas)))))))
Provenance
- Generator
- generators/public_eval_247ef758/generator.py
- Notes and decisions
- generators/public_eval_247ef758/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 35377cb46774076140f878db88014916dfb2fc707179219f48f6a8e27ff24eb6
- Rule hash
- 724e31df5ab1
- Sources
- evaluation, public_eval:247ef758
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_247ef758 --count 1 --seed 20261108 --test 1