← dfa5c1702b4c · dfc3ce537883 →
dfa9d0b2dd41
Two to four isolated, differently colored objects with distinct occupied cell counts. The selected rule sorts by occupied cells and packs bbox crops; two of every three ordinary samples refute the canonical-fitting bbox-area shortcut.
area rankingcomponentsdynamic packing
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).
Reference rule (Racket)
(rule!
(let* ((items (sort (map (lambda (obj)
(list (obj-size obj)
(obj-r1 obj)
(obj-c1 obj)
(subgrid g (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))))
(objects g 0))
(lambda (a b)
(cond [(not (= (first a) (first b))) (< (first a) (first b))]
[(not (= (second a) (second b))) (< (second a) (second b))]
[else (< (third a) (third b))]))))
(rects (map fourth items))
(out-h (apply max (map rows rects)))
(out-w (+ (apply + (map cols rects)) (max 0 (- (length rects) 1)))))
(let pack ([remaining rects] [left 0] [out (empty-grid out-h out-w 0)])
(if (empty? remaining)
out
(let* ((rect (first remaining))
(next (for*/fold ([acc out])
([r (in-range (rows rect))]
[c (in-range (cols rect))])
(let ((v (at rect r c)))
(if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
(pack (rest remaining) (+ left (cols rect) 1) next))))))Provenance
- Generator
- generators/dfa9d0b2dd41/generator.py
- Notes and decisions
- generators/dfa9d0b2dd41/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 727772e1d9736dcf698ef452a02b8903e2a70010e322d15b68930c4ca05cb5ad
- Rule hash
- 76c3cefee423
- Sources
- bank:8ed83d4e427b
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate dfa9d0b2dd41 --count 1 --seed 20261108 --test 1