← 15df00eb9323 · 165ab20d8b6b →

15e7e0613c19

Horizontal gallery sorted by pixel count, height, width, then color.

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 (v0-object-crop grid obj) (let* ((bb (obj-bbox obj)) (r0 (first bb)) (c0 (second bb)) (h (+ 1 (- (third bb) r0))) (w (+ 1 (- (fourth bb) c0)))) (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 (v0-bbox-height bb) (+ 1 (- (third bb) (first bb)))) (define (v0-bbox-width bb) (+ 1 (- (fourth bb) (second bb)))) (define (v0-hstack-top grids (gap 1)) (if (empty? grids) (list (list 0)) (let* ((h (apply max (map rows grids))) (w (+ (apply + (map cols grids)) (* gap (- (length grids) 1))))) (let loop ((pieces grids) (left 0) (out (empty-grid h w 0))) (if (empty? pieces) out (let ((piece (first pieces))) (loop (rest pieces) (+ left (cols piece) gap) (e8b-paste out piece 0 left)))))))) (let* ((items (sort (objects g 0) (lambda (a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (or (< (obj-size a) (obj-size b)) (and (= (obj-size a) (obj-size b)) (or (< (v0-bbox-height ba) (v0-bbox-height bb)) (and (= (v0-bbox-height ba) (v0-bbox-height bb)) (or (< (v0-bbox-width ba) (v0-bbox-width bb)) (and (= (v0-bbox-width ba) (v0-bbox-width bb)) (< (obj-color a) (obj-color b)))))))))))) (pieces (map (lambda (obj) (v0-object-crop g obj)) items))) (v0-hstack-top pieces 1))))

Provenance

Generator
generators/15e7e0613c19/generator.py
Notes and decisions
generators/15e7e0613c19/notes.md
Review label
reviewed_safe
Generator SHA-256
0c8171c8bf81df45cc1ffd8916213712758a96612552e8c9fc5f353873242a17
Rule hash
1f1935df6364
Sources
bank:91ced140cdc4
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 15e7e0613c19 --count 1 --seed 20261108 --test 1