← dc050b56cac4 · dc155169ea57 →
dc0a7662670b
Sort same-color 4-connected components by true exposed-edge perimeter descending, breaking equal-perimeter ties by ascending color; crop and left-align them in a vertical stack separated by one background row. A four-profile schedule explicitly refutes bbox, area, input-order, and descending-color tie shortcuts.
parametric familyperimeter computationshape serializationsorting
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 (perimeter obj)
(apply +
(map (lambda (p)
(count-where (lambda (d)
(not (member (list (+ (first p) (first d))
(+ (second p) (second d)))
(obj-cells obj))))
cardinal-deltas))
(obj-cells obj))))
(define items
(sort (map (lambda (obj) (list (perimeter obj)
(obj-color obj)
(subgrid g (obj-r1 obj) (obj-c1 obj) (obj-r2 obj) (obj-c2 obj))))
(objects g 0))
(lambda (a b)
(if (= (first a) (first b))
(< (second a) (second b))
(> (first a) (first b))))))
(define shapes (map third items))
(define out-h (+ (apply + (map rows shapes)) (max 0 (- (length shapes) 1))))
(define out-w (apply max (map cols shapes)))
(let pack ([remaining shapes] [top 0] [out (empty-grid out-h out-w 0)])
(if (empty? remaining)
out
(let* ((shape (first remaining))
(next (for*/fold ([acc out])
([r (in-range (rows shape))]
[c (in-range (cols shape))])
(let ((v (at shape r c)))
(if (not (= v 0)) (set-cell acc (+ top r) c v) acc)))))
(pack (rest remaining) (+ top (rows shape) 1) next))))))Provenance
- Generator
- generators/dc0a7662670b/generator.py
- Notes and decisions
- generators/dc0a7662670b/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 795d65f89aa4b0dcdb41cec3487bdcc68f61913ab700e54b9e460dd99c42402b
- Rule hash
- eff15ddf94a7
- Sources
- bank:f2c80d62966a
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate dc0a7662670b --count 1 --seed 20261108 --test 1