← d48ec0001283 · d4d38f319c8f →
d4be41674012
Sort three separated objects by their left edge, transpose each cropped object, then stack the pieces vertically with one blank row between them.
parametric familyobjectspackingtranspose
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 (object-grid grid obj) (subgrid grid (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))) (define (shape-place out crop top left) (for*/fold ((acc out)) ((r (in-range (rows crop))) (c (in-range (cols crop)))) (let ((v (at crop r c))) (if (= v 0) acc (set-cell acc (+ top r) (+ left c) v))))) (define objs (sort (objects g 0) (lambda (a b) (< (obj-c1 a) (obj-c1 b))))) (define pieces (map (lambda (obj) (transpose (object-grid g obj))) objs)) (define out-h (+ (apply + (map rows pieces)) (max 0 (- (length pieces) 1)))) (define out-w (apply max (map cols pieces))) (let pack ((remaining pieces) (r0 0) (out (empty-grid out-h out-w 0))) (if (empty? remaining) out (let ((piece (first remaining))) (pack (rest remaining) (+ r0 (rows piece) 1) (shape-place out piece r0 0)))))))
Provenance
- Generator
- generators/d4be41674012/generator.py
- Notes and decisions
- generators/d4be41674012/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 7e58435dc6d702d624304627f939fde0d08e6f548a7f222ee548a86dcfedf88b
- Rule hash
- 30576a22d996
- Sources
- bank:5dfff1627b31
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d4be41674012 --count 1 --seed 20261108 --test 1