← 515cca15a0b7 · 51cb5336f078 →
51c5df6650a9
Read the distinct nonzero colors in the top row from left to right. For each color, tightly crop its separated body component, then pack the crops left-to-right from output row 1 with one blank column between adjacent crops.
component packinglegend decoding
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 (remove-duplicates (filter (lambda (v) (not (= v 0))) (first g))))
(objs (filter (lambda (o) (all? (lambda (p) (> (first p) 0)) (obj-cells o))) (objects g 0))))
(define (find-obj color) (first (filter (lambda (o) (= (obj-color o) color)) objs)))
(define crops (map find-obj legend))
(grid-from-fn (rows g) (cols g)
(lambda (r c)
(let loop ([remaining crops] [offset 0])
(cond [(empty? remaining) 0]
[(and (>= r 1) (>= c offset) (< c (+ offset (obj-w (first remaining)))))
(let* ((obj (first remaining)) (rr (+ (obj-r1 obj) (- r 1))) (cc (+ (obj-c1 obj) (- c offset))))
(if (and (< (- r 1) (obj-h obj)) (member? (list rr cc) (obj-cells obj))) (at g rr cc) 0))]
[else (loop (rest remaining) (+ offset (obj-w (first remaining)) 1))]))))))Provenance
- Generator
- generators/51c5df6650a9/generator.py
- Notes and decisions
- generators/51c5df6650a9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 3ac04fd993034c7bbad26c9243e5c81e908f23bd8580a62c0046bad566890ffa
- Rule hash
- 4ec427a9d6d9
- Sources
- bank:26462ff56908
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 51c5df6650a9 --count 1 --seed 20261108 --test 1