← 0f801939eff6 · 0ff4b77946cc →
0fcb77c31d06
Row 0 is a sparse legend with three or four nonzero colors and one unique frequency winner. Rows 2+ contain two separated objects in that key color plus differently colored distractors. Select the largest key-color object, crop its bounding box from the input, and upscale the crop 2x. Generated examples make the smaller key object occur earlier and make a non-key object larger, so both legend counting and largest-within-key are required.
cropping and scalingfrequency countingkeyed selection
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! (let ((dummy 0)) (define (e8b-list< a b) (cond ((empty? a) #f) ((< (first a) (first b)) #t) ((> (first a) (first b)) #f) (else (e8b-list< (rest a) (rest b))))) (define (s17b-object-crop grid obj) (let ((bb (obj-bbox obj))) (subgrid grid (first bb) (second bb) (third bb) (fourth bb)))) (define (s17b-largest-object objs) (first (sort objs (lambda (a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (or (> (obj-size a) (obj-size b)) (and (= (obj-size a) (obj-size b)) (e8b-list< (list (first ba) (second ba)) (list (first bb) (second bb)))))))))) (let* ((colors (remove-duplicates (filter (lambda (v) (not (= v 0))) (first g)))) (key (first (sort colors (lambda (a b) (let ((ca (count-where (lambda (v) (= v a)) (first g))) (cb (count-where (lambda (v) (= v b)) (first g)))) (or (> ca cb) (and (= ca cb) (< a b)))))))) (work (subgrid g 1 0 (- (rows g) 1) (- (cols g) 1))) (obj (s17b-largest-object (filter (lambda (obj) (= (obj-color obj) key)) (objects work 0))))) (upscale (s17b-object-crop work obj) 2))))
Provenance
- Generator
- generators/0fcb77c31d06/generator.py
- Notes and decisions
- generators/0fcb77c31d06/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 6f886ddc07655663270b14e8eb3c76b7b6000852664c3274906b246938ecfc93
- Rule hash
- c515fc7de0cf
- Sources
- bank:5deb8ef303b3
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 0fcb77c31d06 --count 1 --seed 20261108 --test 1