← public_eval_8e5c0c38 · public_eval_8f3a5a89 →
public_eval_8f215267
Count connected external objects by frame color and encode the counts as spaced dots.
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!
;; Find the wide hollow rectangular frames, whose colors are tally keys.
;; Remove those frames from an analysis copy, then segment the remaining
;; same-color objects with the declared connectivity. Count them per key.
;; Preserve only the frames and encode each count as isolated same-color
;; dots on the central row, right aligned, with one blank cell between dots
;; and a blank margin before the right wall. Unlisted colors disappear.
;; The canonical extension uses four-neighbor connectivity; all original
;; examples are reproduced without relying on fixed colors or locations.
(lambda (g)
(let ()
(define connectivity 4)
(define bg (at g 0 0))
(define (frame? o)
(and (>= (obj-h o) 5) (>= (obj-w o) 7)
(= (obj-size o) (- (* 2 (+ (obj-h o) (obj-w o))) 4))
(for/and ((p (obj-cells o)))
(or (= (first p) (obj-r1 o)) (= (first p) (obj-r2 o))
(= (second p) (obj-c1 o)) (= (second p) (obj-c2 o))))))
(define frames (filter frame? (objects g bg)))
(define body
(for/fold ((out g)) ((f frames))
(for/fold ((canvas out)) ((p (obj-cells f)))
(set-cell canvas (first p) (second p) bg))))
(define pieces (if (= connectivity 8) (objects-8 body bg) (objects body bg)))
(define base (empty-grid (rows g) (cols g) bg))
(for/fold ((out base)) ((f frames) (index (range (length frames))))
(let ()
(define key-color (obj-color f))
(define matches (filter (lambda (o) (= (obj-color o) key-color)) pieces))
(define raw-count (length matches))
(define n raw-count)
(define capacity (quotient (- (obj-w f) 3) 2))
(define border (for/fold ((canvas out)) ((p (obj-cells f)))
(set-cell canvas (first p) (second p) (obj-color f))))
(for/fold ((canvas border)) ((k (range 1 (+ 1 (min capacity n)))))
(set-cell canvas (quotient (+ (obj-r1 f) (obj-r2 f)) 2)
(- (obj-c2 f) (* 2 k)) (obj-color f))))))))
Provenance
- Generator
- generators/public_eval_8f215267/generator.py
- Notes and decisions
- generators/public_eval_8f215267/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- a83eb3186629dfd73197c8234b8d32030bc07842c051f0f25df54d1f8b4ccc6d
- Rule hash
- a5117050bac0
- Sources
- evaluation, public_eval:8f215267
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_8f215267 --count 1 --seed 20261108 --test 1