← a338acade0b5 · a3a85fedfec1 →

a36fd3a00941

A zero-background grid contains three separated monochrome pieces. Crop each object to its bounding box, sort the crops by bounding-box perimeter ascending (ties: original left column, then top row), and pack them left-to-right, top-aligned, with one zero column between crops.

croppingpackingsorting

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 (obj-grid obj) (let* ((r0 (obj-r1 obj)) (c0 (obj-c1 obj))) (paint-cells (empty-grid (obj-h obj) (obj-w obj) 0) (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) (obj-cells obj)) (obj-color obj)))) (define (place-transparent out sub top left) (for*/fold ((acc out)) ((r (in-range (rows sub))) (c (in-range (cols sub)))) (let ((v (at sub r c)) (rr (+ top r)) (cc (+ left c))) (if (and (not (= v 0)) (in-bounds? rr cc (rows out) (cols out))) (set-cell acc rr cc v) acc)))) (define (gallery-top grids) (let* ((h (if (empty? grids) 1 (apply max (map rows grids)))) (w (if (empty? grids) 1 (+ (apply + (map cols grids)) (max 0 (- (length grids) 1)))))) (let loop ((remaining grids) (left 0) (out (empty-grid h w 0))) (if (empty? remaining) out (let ((piece (first remaining))) (loop (rest remaining) (+ left (cols piece) 1) (place-transparent out piece 0 left))))))) (define (bbox-perimeter obj) (* 2 (+ (obj-h obj) (obj-w obj)))) (let* ((objs (sort (objects g 0) (lambda (a b) (cond ((not (= (bbox-perimeter a) (bbox-perimeter b))) (< (bbox-perimeter a) (bbox-perimeter b))) ((not (= (obj-c1 a) (obj-c1 b))) (< (obj-c1 a) (obj-c1 b))) (else (< (obj-r1 a) (obj-r1 b))))))) (crops (map obj-grid objs))) (gallery-top crops))))

Provenance

Generator
generators/a36fd3a00941/generator.py
Notes and decisions
generators/a36fd3a00941/notes.md
Review label
reviewed_safe
Generator SHA-256
b4346a02502a9be2f1b7a4293918fa94698ebd3246e6588bfe8c92812a3665a5
Rule hash
d0dcd1dd1256
Sources
bank:f49e478ddaeb
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate a36fd3a00941 --count 1 --seed 20261108 --test 1