← 33c7c507a8ef · 33f9169a335e →

33d2674e3094

Three disconnected monochrome objects appear on black. Crop each object to its bounding box, sort by descending cell area, break equal-area ties by top/bottom/left/right bounding-box order, then concatenate the crops left-to-right, top-aligned, with one black separator column. Scheduled tie scenes rule out color-based tie breaking; sparse shapes distinguish cell area from bounding-box area.

galleryobjectssorting

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 (bbox< a b) (cond ((not (= (first a) (first b))) (< (first a) (first b))) ((not (= (third a) (third b))) (< (third a) (third b))) ((not (= (second a) (second b))) (< (second a) (second b))) (else (< (fourth a) (fourth b))))) (define (object-area-bbox< a b) (if (= (obj-size a) (obj-size b)) (bbox< (obj-bbox a) (obj-bbox b)) (> (obj-size a) (obj-size b)))) (define (sorted-objects grid) (sort (objects grid 0) object-area-bbox<)) (define (crop-obj grid obj) (let* ((r0 (obj-r1 obj)) (c0 (obj-c1 obj)) (h (obj-h obj)) (w (obj-w obj))) (for/fold ((out (empty-grid h w 0))) ((p (in-list (obj-cells obj)))) (set-cell out (- (first p) r0) (- (second p) c0) (at grid (first p) (second p)))))) (define (paste-crop grid crop r0 c0 (overwrite-zero #f)) (for*/fold ((out grid)) ((r (in-range (rows crop))) (c (in-range (cols crop)))) (let ((v (at crop r c))) (if (or overwrite-zero (not (= v 0))) (let ((rr (+ r0 r)) (cc (+ c0 c))) (if (in-bounds? rr cc (rows grid) (cols grid)) (set-cell out rr cc v) out)) out)))) (define (gallery crops) (if (empty? crops) (list (list 0)) (let* ((h (apply max (map rows crops))) (w (+ (apply + (map cols crops)) (max 0 (- (length crops) 1))))) (let pack ((remaining crops) (left 0) (out (empty-grid h w 0))) (if (empty? remaining) out (let ((crop (first remaining))) (pack (rest remaining) (+ left (cols crop) 1) (paste-crop out crop 0 left #f)))))))) (gallery (map (lambda (obj) (crop-obj g obj)) (sorted-objects g)))))

Provenance

Generator
generators/33d2674e3094/generator.py
Notes and decisions
generators/33d2674e3094/notes.md
Review label
reviewed_safe
Generator SHA-256
1c5f8d476ea8f590b75926cc94def1eef28983680e77b7154c35ee68d0e16751
Rule hash
9f849a344655
Sources
bank:fec6a16dfcc9
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 33d2674e3094 --count 1 --seed 20261108 --test 1