← 2038a3a66886 · 204eaaff6c24 →
204213f10aff
Sparse legend colors select body pieces; crop and pack only those pieces in legend order.
parametric familycomponent croppinglegend decodingordered composition
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* ((legend (filter (lambda (v) (not (= v 0))) (row g 0))))
(define (piece color)
(let ((obj (first (filter (lambda (o)
(and (= (obj-color o) color)
(all? (lambda (p) (> (first p) 0)) (obj-cells o))))
(objects g 0)))))
(subgrid g (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))))
(define parts (map piece legend))
(define out-h (apply max (map rows parts)))
(define out-w (+ (apply + (map cols parts)) (max 0 (- (length parts) 1))))
(let pack ([remaining parts] [left 0] [out (empty-grid out-h out-w 0)])
(if (empty? remaining)
out
(let* ((p (first remaining))
(next (for*/fold ([acc out])
([r (in-range (rows p))]
[c (in-range (cols p))])
(let ((v (at p r c)))
(if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
(pack (rest remaining) (+ left (cols p) 1) next))))))Provenance
- Generator
- generators/204213f10aff/generator.py
- Notes and decisions
- generators/204213f10aff/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 4bfbc51514de16389fe66a398348dfacdf25061a5d0eda5c53b5ef20fc558f50
- Rule hash
- 7e1018f60923
- Sources
- bank:f234ef852d75
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 204213f10aff --count 1 --seed 20261108 --test 1