← a78185b4bd20 · a7a47f5cee60 →
a784ff872856
Extract each nonzero 4-connected object, crop it to its bounding box, sort by bounding-box width descending, then height descending, then color ascending, and vertically pack the left-aligned crops with one zero row between neighbors.
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-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (f4-norm cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb))) (map (lambda (p) (list (- (first p) r0) (- (second p) c0))) cells))) (define (f4-norm-info cells) (let* ((bb (bbox-of-cells cells)) (r0 (first bb)) (c0 (second bb)) (r1 (third bb)) (c1 (fourth bb))) (list (f4-norm cells) (+ 1 (- r1 r0)) (+ 1 (- c1 c0))))) (define (nx-vpack-shapes items) (if (empty? items) (list) (let* ((h (+ (apply + (map second items)) (- (length items) 1))) (w (apply max (map third items)))) (let loop ((xs items) (top 0) (out (empty-grid h w 0))) (if (empty? xs) out (let ((shape (first (first xs))) (ih (second (first xs))) (iw (third (first xs))) (color (fourth (first xs)))) (loop (rest xs) (+ top ih 1) (paint-cells out (map (lambda (p) (list (+ top (first p)) (second p))) shape) color)))))))) (let* ((items (for/list ((obj (in-list (objects g 0)))) (let ((info (f4-norm-info (obj-cells obj)))) (list (third info) (second info) (obj-color obj) (first info))))) (sorted (sort items (lambda (a b) (e8b-list< (list (- (first a)) (- (second a)) (third a)) (list (- (first b)) (- (second b)) (third b)))))) (pack-items (map (lambda (item) (list (fourth item) (second item) (first item) (third item))) sorted))) (nx-vpack-shapes pack-items))))
Provenance
- Generator
- generators/a784ff872856/generator.py
- Notes and decisions
- generators/a784ff872856/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 6790a56640ea1cf49ca945e6794781b42dedcda4dc1c8eb72e0cc1c9b2e8a064
- Rule hash
- 7991026f57da
- Sources
- bank:391ca7d21fbe
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate a784ff872856 --count 1 --seed 20261108 --test 1