← d09fae8197f6 · d0d18b0499a5 →
d0a85a878975
Ignore non-square distractors, count monochrome solid-square components by side length, conditionally remove one excess smallest square as the size key, then emit count-layered top-left nested-square tally glyphs.
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!
;; Solid squares are TALLY marks: each size s (2+) appears some number
;; of times, one color per size. Redraw the tally as corner-nested
;; glyphs: every glyph shows the sizes still active that round stacked
;; in one corner (smallest on top), emitted round-robin until all
;; counts run dry, each glyph followed by a blank spacer column. If
;; the smallest size outnumbers the runner-up, one of its tallies is
;; dropped (that square doubles as the size key).
(lambda (g)
(let ()
(define bg (mode g -1))
(define squares ;; (size color) per solid square, size >= 2
(filter (lambda (x) x)
(map (lambda (o)
(and (>= (obj-h o) 2)
(= (obj-h o) (obj-w o))
(= (obj-size o) (* (obj-h o) (obj-w o)))
(list (obj-h o) (obj-color o))))
(objects g bg))))
(define sizes (sort (remove-duplicates (map first squares)) <))
(define (color-of s)
(second (find (lambda (sq) (= (first sq) s)) squares)))
(define counts
(let ((raw (map (lambda (s)
(count-if (lambda (sq) (= (first sq) s))
squares))
sizes)))
(if (and (>= (length sizes) 2) (> (first raw) (second raw)))
(cons (- (first raw) 1) (rest raw))
raw)))
(define blocks ;; glyphs: active-size lists, round-robin
(let loop ((pairs (zip-lists sizes counts)) (acc (list)))
(if (null? pairs)
acc
(let ((m (min-list (map second pairs))))
(loop (filter (lambda (p) (> (second p) 0))
(map (lambda (p) (list (first p)
(- (second p) m)))
pairs))
(append acc (make-list m (map first pairs))))))))
(define out-h (+ (max-list sizes) 1))
(define (glyph-w blk) (+ 1 (max-list blk)))
(let loop ((bs blocks) (col 0)
(out (empty-grid out-h
(apply + (map glyph-w blocks))
bg)))
(if (null? bs)
out
(loop (rest bs) (+ col (glyph-w (first bs)))
(for*/fold ((acc out))
((r (range 0 out-h))
(c (range 0 (glyph-w (first bs)))))
(let ((cover (filter (lambda (s)
(>= s (+ 1 (max r c))))
(first bs))))
(if (null? cover)
acc
(set-cell acc r (+ col c)
(color-of (min-list cover))))))))))))Provenance
- Generator
- generators/d0a85a878975/generator.py
- Notes and decisions
- generators/d0a85a878975/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- e9eabe150278cbafa4f875e149fef52af1b94583d6194014c602f16031d87fa1
- Rule hash
- 2b65c25d51af
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate d0a85a878975 --count 1 --seed 20261108 --test 1