← 5f8abe24cffe · 5f9a2df57599 →
5f94fa359992
A 0-background grid contains three or four horizontally separated, equally sized hollow color-9 square frames. Each frame contains one monochrome figure and has one distinct nonzero/non-9 key directly above it. Tight-crop every figure, sort the crops by ascending key value, vertically center them in the tallest crop, and hstack them with one blank column between neighbors.
crop extractionframe parsingkey-based ordering
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).
Original task pairs
From the source task; the reference rule must reproduce them.
Reference rule (Racket)
(rule!
;; Maroon(9) frames each hold a small figure and carry a KEY color
;; dot just above their top edge. Extract each figure (maroon
;; scrubbed, cropped) and lay them out in one row ordered by key
;; color — vertically centered, one blank column between neighbors.
(lambda (g)
(let ()
(define (crop-nonzero grid)
(let ((cells (filter (lambda (p) (> (at grid (first p)
(second p))
0))
(grid-positions grid))))
(if (empty? cells)
(list (list 0))
(let ((bb (bbox-of-cells cells)))
(subgrid grid (first bb) (second bb)
(third bb) (fourth bb))))))
(define (frame? o) ;; hollow maroon rectangle outline, 3x3+
(and (= (obj-color o) 9)
(>= (obj-h o) 3) (>= (obj-w o) 3)
(= (obj-size o) (- (* 2 (+ (obj-h o) (obj-w o))) 4))
(all? (lambda (p) (or (= (first p) (obj-r1 o))
(= (first p) (obj-r2 o))
(= (second p) (obj-c1 o))
(= (second p) (obj-c2 o))))
(obj-cells o))))
(define frames
(sort (filter frame? (objects g 0))
(lambda (a b) (or (< (obj-r1 a) (obj-r1 b))
(and (= (obj-r1 a) (obj-r1 b))
(< (obj-c1 a) (obj-c1 b)))))))
(define (key-of fr)
(let ((r (- (obj-r1 fr) 1)))
(first (if (>= r 0)
(filter (lambda (v) (not (member? v (list 0 9))))
(map (lambda (c) (at g r c))
(range (obj-c1 fr)
(+ (obj-c2 fr) 1))))
(list)))))
(define (figure-of fr)
(crop-nonzero
(cellmap (subgrid g (+ (obj-r1 fr) 1) (+ (obj-c1 fr) 1)
(- (obj-r2 fr) 1) (- (obj-c2 fr) 1))
(r c v) (if (= v 9) 0 v))))
(define figures
(map second
(sort (map (lambda (fr) (list (key-of fr) (figure-of fr)))
frames)
(lambda (a b) (< (first a) (first b))))))
(let ((oh (apply max (map rows figures)))
(ow (+ (apply + (map cols figures))
(- (length figures) 1))))
(let loop ((xs figures) (left 0) (out (empty-grid oh ow 0)))
(if (empty? xs)
out
(let ((piece (first xs)))
(loop (rest xs) (+ left (cols piece) 1)
(for*/fold ((acc out))
((r (range 0 (rows piece)))
(c (range 0 (cols piece))))
(let ((v (at piece r c)))
(if (> v 0)
(set-cell acc
(+ (quotient (- oh (rows piece))
2)
r)
(+ left c) v)
acc)))))))))))Provenance
- Generator
- generators/5f94fa359992/generator.py
- Notes and decisions
- generators/5f94fa359992/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 1eb55e499f3f2d482825a1a84941f7aea65e262a10dc72fbd347984d0ab1148e
- Rule hash
- c5cd0106e07a
- Sources
- bank:9f005a7005fe
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5f94fa359992 --count 1 --seed 20261108 --test 1