← 3ce95b466478 · 3dc5b297cfa2 →
3d48e913ef07
Read the distinct first-column colors top to bottom; rank the separated color-3 components by descending cell area; crop and recolor them in that palette order; then stack the crops vertically with one blank row.
area rankingpalette decodingsize changevertical packing
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 (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-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 (s17b-object-crop grid obj) (let ((bb (obj-bbox obj))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (define (t10b-recolor grid color) (grid-from-fn (rows grid) (cols grid) (lambda (r c) (if (= (at grid r c) 0) 0 color)))) (define (t3b-vstack-left grids (gap 1)) (if (empty? grids) (list (list 0)) (let* ((h (+ (apply + (map rows grids)) (* gap (- (length grids) 1)))) (w (apply max (map cols grids)))) (let loop ((rest-grids grids) (top 0) (out (empty-grid h w 0))) (if (empty? rest-grids) out (let ((piece (first rest-grids))) (loop (rest rest-grids) (+ top (rows piece) gap) (e8b-paste out piece top 0)))))))) (let* ((palette (map (lambda (p) (at g (first p) (second p))) (sort (filter (lambda (p) (and (= (second p) 0) (not (member? (at g (first p) (second p)) (list 0 3))))) (grid-positions g)) e8b-list<))) (objs (sort (filter (lambda (obj) (= (obj-color obj) 3)) (objects g 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))))))) (crops (let loop ((rest-objs objs) (colors palette) (acc (list))) (if (or (empty? rest-objs) (empty? colors)) (reverse acc) (loop (rest rest-objs) (rest colors) (cons (t10b-recolor (s17b-object-crop g (first rest-objs)) (first colors)) acc)))))) (t3b-vstack-left crops 1))))
Provenance
- Generator
- generators/3d48e913ef07/generator.py
- Notes and decisions
- generators/3d48e913ef07/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 083c42f670fc323018502eca4840c292a0f56b3ecd394da49e1303c479b95067
- Rule hash
- 4d5171afc86a
- Sources
- bank:6ee66428b984
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 3d48e913ef07 --count 1 --seed 20261108 --test 1