← 5949237e2737 · 59a7762bc6da →

595eebab5aea

Read three distinct rank colors left-to-right in row 0. Rank three separated monochrome body components by descending area, then bounding-box top and left ascending. Recolor their crops in rank order and stack with one blank row, centered with floor((maximum width - piece width)/2). Ties, narrow and wide crops, shape variation, and positional tie witnesses are ordinary generated inputs.

area rankingpacked compositionrecolor by rank

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! (let ((dummy 0)) (define (recolor-grid grid color) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 color)))) (define (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (e8b-crop-obj grid obj) (let ((bb (obj-bbox obj))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (define (e8b-paste grid pat top left) (for*/fold ((out grid)) ((r (in-range (rows pat))) (c (in-range (cols pat)))) (let ((v (at pat r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows out) (cols out))) (set-cell out rr cc v) out)))) (define (e11b-vstack-center grids gap) (if (empty? grids) (list (list)) (let* ((w (apply max (map cols grids))) (h (+ (apply + (map rows grids)) (* gap (- (length grids) 1))))) (let loop ((xs grids) (top 0) (out (empty-grid h w 0))) (if (empty? xs) out (let* ((p (first xs)) (left (quotient (- w (cols p)) 2))) (loop (rest xs) (+ top (rows p) gap) (e8b-paste out p top left)))))))) (let* ((rank-colors (filter (lambda (v) (not (= v 0))) (first g))) (work (subgrid g 1 0 (- (rows g) 1) (- (cols g) 1))) (objs (sort (filter (lambda (obj) (> (obj-size obj) 1)) (objects work 0)) (lambda (a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (e8b-list< (list (- (obj-size a)) (first ba) (second ba)) (list (- (obj-size b)) (first bb) (second bb))))))) (pieces (let loop ((os objs) (cs rank-colors) (acc (list))) (if (or (empty? os) (empty? cs)) (reverse acc) (loop (rest os) (rest cs) (cons (recolor-grid (e8b-crop-obj work (first os)) (first cs)) acc)))))) (e11b-vstack-center pieces 1))))

Provenance

Generator
generators/595eebab5aea/generator.py
Notes and decisions
generators/595eebab5aea/notes.md
Review label
reviewed_safe
Generator SHA-256
92d329fc0fca6d59485820dc8fb544600fc521065f4b38dafe6894f85f1cb837
Rule hash
5e9e9e076193
Sources
bank:db2a1cce4e4e
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 595eebab5aea --count 1 --seed 20261108 --test 1