← d3575d4206d7 · d3633a9fb1cd →
d35dbdf1cfc2
Extract the three to five isolated same-colour motifs. Crop each motif; rotate a crop 90° clockwise only when it is taller than wide. Sort the resulting crops by motif size descending and colour ascending, then pack them left-to-right with one zero column between adjacent crops.
parametric familycomponent extractionconditional rotationsorting and 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 ((dummy 0))
(define items
(sort (map (lambda (obj)
(let* ((crop (subgrid g (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj)))
(wide (if (> (rows crop) (cols crop)) (rotate-cw crop) crop)))
(list (obj-size obj) (obj-color obj) wide)))
(objects g 0))
(lambda (a b)
(if (= (first a) (first b))
(< (second a) (second b))
(> (first a) (first b))))))
(define grids (map third items))
(define out-h (apply max (map rows grids)))
(define out-w (+ (apply + (map cols grids)) (max 0 (- (length grids) 1))))
(let pack ([remaining grids] [left 0] [out (empty-grid out-h out-w 0)])
(if (empty? remaining)
out
(let* ((grid (first remaining))
(next (for*/fold ([acc out])
([r (in-range (rows grid))]
[c (in-range (cols grid))])
(let ((v (at grid r c)))
(if (not (= v 0)) (set-cell acc r (+ left c) v) acc)))))
(pack (rest remaining) (+ left (cols grid) 1) next))))))Provenance
- Generator
- generators/d35dbdf1cfc2/generator.py
- Notes and decisions
- generators/d35dbdf1cfc2/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 26b0c904afc99c2444f63b74c543aafb7d13898c25f98a8fa2c7930fe75683ec
- Rule hash
- 0d1461c8b2f0
- Sources
- bank:0527e10c7137
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d35dbdf1cfc2 --count 1 --seed 20261108 --test 1