← 48c4c6a42b59 · 49197f3c9375 →
48fee61713bb
Read hollow 3x3 rings on a four-cell lattice; identify cyan as the seven-slice main picture and the other colors as two aligned small pictures; then compress per-slice ring counts into colored stacks, with cyan on the side indicated by its position relative to the small pictures.
parametric family
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!
;; Hollow 4x4 blocks on a coarse lattice form one big cyan(8) group
;; and small colored groups; a blue(1) bar marks the gravity edge.
;; Per lattice slice (column of the cyan group when it is wide, row
;; when tall), count the cyan blocks and the overlapping small-group
;; blocks, and emit stacked bars: cyan pressed toward the blue bar,
;; the small color on top, empty above.
(lambda (g)
(let ()
(define (analyze col) ;; (color bh bw blocks r1 c1) on the lattice
(let* ((cells (find-color g col))
(r1 (min-list (map first cells)))
(c1 (min-list (map second cells)))
(bh (quotient (+ (- (max-list (map first cells)) r1) 2) 4))
(bw (quotient (+ (- (max-list (map second cells)) c1) 2) 4)))
(list col bh bw
(map (lambda (br)
(map (lambda (bc)
(if (= (at g (+ r1 (* br 4)) (+ c1 (* bc 4)))
col)
1 0))
(range 0 bw)))
(range 0 bh))
r1 c1)))
(define (i-color i) (nth i 0))
(define (i-bh i) (nth i 1))
(define (i-bw i) (nth i 2))
(define (i-blocks i) (nth i 3))
(define (i-r1 i) (nth i 4))
(define (i-c1 i) (nth i 5))
(define infos
(map analyze (filter (lambda (c) (and (not (= c 0)) (not (= c 1))))
(grid-colors g))))
(define main (find (lambda (i) (= (i-color i) 8)) infos))
(define smalls (filter (lambda (i) (not (= (i-color i) 8))) infos))
(define horizontal? (> (i-bw main) (i-bh main)))
(define main-at-end ;; cyan sits past the smalls, away from the bar
(if horizontal?
(> (- (i-r1 main)
(quotient (apply + (map i-r1 smalls)) (length smalls)))
0)
(> (- (i-c1 main)
(quotient (apply + (map i-c1 smalls)) (length smalls)))
0)))
(define (col-sum blocks i n)
(sum-list (map (lambda (br) (nth (nth blocks br) i)) (range 0 n))))
(define (slice-counts i) ;; (cyan-count small-count small-color)
(let* ((m-count (if horizontal?
(col-sum (i-blocks main) i (i-bh main))
(sum-list (nth (i-blocks main) i))))
(s-info (find (lambda (si)
(let ((off (if horizontal?
(quotient (- (i-c1 si)
(i-c1 main))
4)
(quotient (- (i-r1 si)
(i-r1 main))
4))))
(and (>= i off)
(< i (+ off (if horizontal?
(i-bw si)
(i-bh si)))))))
smalls)))
(list m-count
(if s-info
(if horizontal?
(col-sum (i-blocks s-info)
(- i (quotient (- (i-c1 s-info)
(i-c1 main))
4))
(i-bh s-info))
(sum-list (nth (i-blocks s-info)
(- i (quotient (- (i-r1 s-info)
(i-r1 main))
4)))))
0)
(if s-info (i-color s-info) 0))))
(define n-slices (if horizontal? (i-bw main) (i-bh main)))
(define slices (map slice-counts (range 0 n-slices)))
(define max-h (max-of (lambda (s) (+ (first s) (second s))) slices))
(define (bar triple) ;; one stacked slice, padded to max-h
(let ((m (make-list (first triple) 8))
(s (make-list (second triple) (third triple)))
(p (make-list (- max-h (+ (first triple) (second triple)))
0)))
(if main-at-end (append p s m) (append m s p))))
(define stacks (map bar slices))
(if horizontal?
(map (lambda (r) (map (lambda (c) (nth (nth stacks c) r))
(range 0 n-slices)))
(range 0 max-h))
stacks))))Provenance
- Generator
- generators/48fee61713bb/generator.py
- Notes and decisions
- generators/48fee61713bb/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 7a43eacd6626e8c595ea24c4a7c75874d6e40993598f3cc75dfc3b58ffdb3a3b
- Rule hash
- 88f9214cd87f
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 48fee61713bb --count 1 --seed 20261108 --test 1