← public_eval_7b80bb43 · public_eval_7ed72f31 →
public_eval_7c66cb00
No summary in the catalog.
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!
;; Separate each monochrome source piece above the horizontal bands.
;; Match its original color to a band's interior color; preserve its columns,
;; bottom-align it to that band's floor, and paint in that band's rail color.
;; Components are independently aligned, not sequentially piled up.
(lambda (g)
(let ()
(define output-policy "all_landings")
(define bg (at g 0 0))
(define band-rows
(filter (lambda (r)
(and (= (at g r 0) (at g r (- w 1)))
(not (= (at g r 0) (at g r 1)))
(not (= (at g r 1) bg))
(for/and ((c (range 1 (- w 1)))) (= (at g r c) (at g r 1)))))
(range h)))
(define bands
(for/list ((r band-rows)
#:when (or (= r 0) (not (member (- r 1) band-rows))
(not (= (at g (- r 1) 1) (at g r 1)))))
(list r
(let loop ((end r))
(if (and (member (+ end 1) band-rows)
(= (at g (+ end 1) 1) (at g r 1))) (loop (+ end 1)) end))
(at g r 1) (at g r 0))))
(define top (if (null? bands) h (first (first bands))))
(define pieces (objects (subgrid g 0 0 (- top 1) (- w 1)) bg))
(define deliveries
(for/list ((o pieces))
(let ((b (for/first ((b bands) #:when (= (third b) (obj-color o))) b)))
(list o b
(if b (map (lambda (p) (list (+ (first p) (- (second b) (obj-r2 o))) (second p)))
(obj-cells o)) '())))))
(define cleared
(for/fold ((out g)) ((d deliveries))
(if (second d) (recolor-cells out (obj-cells (first d)) bg) out)))
(define landed
(for/fold ((out cleared)) ((d deliveries))
(if (second d) (recolor-cells out (third d) (fourth (second d))) out)))
(define mask
(for/fold ((out (empty-grid h w -1))) ((d deliveries))
(if (second d) (recolor-cells out (third d) (fourth (second d))) out)))
(define groups (objects mask -1))
(define selected
(cond
((or (equal? output-policy "all_landings") (null? groups)) '())
((equal? output-policy "original_largest")
(third (pick-max deliveries (lambda (d) (obj-size (first d))))))
((equal? output-policy "most_color")
(let ((col (pick-max (grid-colors mask -1) (lambda (c) (count-color mask c)))))
(find-color mask col)))
((equal? output-policy "most_pieces")
(let* ((b (pick-max bands (lambda (b)
(length (filter (lambda (d) (equal? (second d) b)) deliveries)))))
(parts (filter (lambda (o) (and (>= (obj-r1 o) (first b))
(<= (obj-r2 o) (second b)))) groups)))
(obj-cells (pick-max parts obj-size))))
((equal? output-policy "per_band")
(apply append
(for/list ((b bands))
(let ((parts (filter (lambda (o) (and (>= (obj-r1 o) (first b))
(<= (obj-r2 o) (second b)))) groups)))
(if (null? parts) '() (obj-cells (pick-max parts obj-size)))))))
((equal? output-policy "smallest") (obj-cells (pick-min groups obj-size)))
((equal? output-policy "first") (obj-cells (first groups)))
((equal? output-policy "last") (obj-cells (last groups)))
((equal? output-policy "exact_nine")
(apply append (map obj-cells (filter (lambda (o) (= (obj-size o) 9)) groups))))
(else (obj-cells (pick-max groups obj-size)))))
(recolor-cells landed selected 9))))
Provenance
- Generator
- generators/public_eval_7c66cb00/generator.py
- Notes and decisions
- generators/public_eval_7c66cb00/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 72cb782413ce6cae49310cad629001cc7b5b977a5fb2d35aaeadaf443b526355
- Rule hash
- f591172ba980
- Sources
- evaluation, public_eval:7c66cb00
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_7c66cb00 --count 1 --seed 20261108 --test 1