← 07dbda8c31c9 · 0832c700ffb9 →
07eaf5f238ad
The nonzero top-row colours select body objects in header order. The first row-major object of each colour is cropped to its bbox and packed left-to-right with one zero column between pieces. Missing header colours are skipped, repeated colours repeat the same crop, and non-header objects are ignored.
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! (let ((dummy 0)) (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 (f14-crop-cells grid cells) (let ((bb (bbox-of-cells cells))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (define (f14-pack-h-top grids) (if (empty? grids) (list (list 0)) (let* ((h (apply max (map rows grids))) (w (+ (apply + (map cols grids)) (- (length grids) 1)))) (let loop ((pieces grids) (left 0) (out (empty-grid h w 0))) (if (empty? pieces) out (loop (rest pieces) (+ left (cols (first pieces)) 1) (e8b-paste out (first pieces) 0 left))))))) (let* ((header (filter (lambda (v) (not (= v 0))) (first g))) (body (subgrid g 1 0 (- (rows g) 1) (- (cols g) 1))) (objs (objects body 0)) (pieces (filter values (map (lambda (color) (let ((hits (filter (lambda (obj) (= (obj-color obj) color)) objs))) (if (empty? hits) #f (f14-crop-cells body (obj-cells (first hits)))))) header)))) (f14-pack-h-top pieces))))
Provenance
- Generator
- generators/07eaf5f238ad/generator.py
- Notes and decisions
- generators/07eaf5f238ad/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- e086b388c06062a5a20b5f9164ad1e659b2892e8b85b89c5c88d1ed4c08edac6
- Rule hash
- d10bfd060d8f
- Sources
- bank:e14e4b5836bc
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 07eaf5f238ad --count 1 --seed 20261108 --test 1