← 4512012999bb · 45922a9666b2 →

457b4958145b

First-9 anchored bbox-angle gallery with literal color-dependent padding. Four-demo lessons alternate a combined contrast scene and varied objects; repeated colors, multiple 9s and intentional padded-crop intrusion are supported.

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 (obj< a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (if (= (first ba) (first bb)) (< (second ba) (second bb)) (< (first ba) (first bb))))) (define (points-of grid color) (sort (find-color grid color) cell<)) (define (bbox-h bb) (+ 1 (- (third bb) (first bb)))) (define (bbox-w bb) (+ 1 (- (fourth bb) (second bb)))) (define (hconcat-all grids) (if (empty? (rest grids)) (first grids) (foldl (lambda (g acc) (hconcat acc g)) (first grids) (rest grids)))) (define (padded-object-crop grid obj hub) (let* ((bb (obj-bbox obj)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (dr (- (+ r1 r2) (* 2 (first hub)))) (dc (- (+ c1 c2) (* 2 (second hub)))) (nr1 r1) (nr2 (if (< (bbox-h bb) 3) (min (- (rows grid) 1) (+ r2 1)) r2)) (wide-special (or (= (obj-color obj) 6) (and (= (obj-color obj) 2) (< (bbox-h bb) 3) (= (bbox-w bb) 3)))) (left-extra (or wide-special (and (< (bbox-w bb) 3) (or (< dc 0) (> dr 0))))) (nc1 (if left-extra (max 0 (- c1 1)) c1)) (nc2 (if (and (not left-extra) (< (bbox-w bb) 3)) (min (- (cols grid) 1) (+ c2 1)) c2))) (subgrid grid nr1 nc1 nr2 nc2))) (define (angle-before? a b hub) (let* ((ba (obj-bbox a)) (bb (obj-bbox b)) (dra (- (+ (first ba) (third ba)) (* 2 (first hub)))) (dca (- (+ (second ba) (fourth ba)) (* 2 (second hub)))) (drb (- (+ (first bb) (third bb)) (* 2 (first hub)))) (dcb (- (+ (second bb) (fourth bb)) (* 2 (second hub)))) (ha (>= dca 0)) (hb (>= dcb 0)) (xa (- dra)) (ya dca) (xb (- drb)) (yb dcb) (cross (- (* xa yb) (* ya xb)))) (if (not (equal? ha hb)) ha (if (= cross 0) (obj< a b) (> cross 0))))) (define (gallery-pack crops) (hconcat-all crops)) (let* ((hub (first (points-of g 9))) (objs (filter (lambda (o) (not (= (obj-color o) 9))) (objects g 0))) (ordered (sort objs (lambda (a b) (angle-before? a b hub)))) (crops (map (lambda (o) (padded-object-crop g o hub)) ordered))) (gallery-pack crops))))

Provenance

Generator
generators/457b4958145b/generator.py
Notes and decisions
generators/457b4958145b/notes.md
Review label
reviewed_safe
Generator SHA-256
de87b51c039662d6ddc0e3ef8a99f6868599f5a4a55d5bc0d8be7f8b03521662
Rule hash
4b56f7983d0d
Sources
bank:1cd6e373f225
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 457b4958145b --count 1 --seed 20261108 --test 1