← 5d9c166a8c3b · 5dc10de63325 →
5da2f80a4a4f
A 0-background grid contains one hollow colour-2 rectangular frame and one fully coloured rectangular key strictly inside it. Extract the key's bounding box, then resize it by integer row/column replication to fill the frame interior. Return only the frame bounding box: colour-2 border plus the enlarged key. Key position inside the input frame is irrelevant.
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! (lambda (g)
;; Find the hollow colour-2 frame and preserve its bounding-box dimensions.
(define bb (bbox-of-cells (find-color g 2)))
(define r0 (first bb))
(define c0 (second bb))
(define r1 (third bb))
(define c1 (fourth bb))
(define oh (+ 1 (- r1 r0)))
(define ow (+ 1 (- c1 c0)))
;; The non-background, non-frame rectangle inside the border is the key.
(define interior
(for*/list ([r (in-range (+ r0 1) r1)]
[c (in-range (+ c0 1) c1)])
(list r c)))
(define key-cells
(filter (lambda (p)
(let ((v (at g (first p) (second p))))
(and (not (= v 0)) (not (= v 2)))))
interior))
(define kbb (bbox-of-cells key-cells))
(define kr0 (first kbb))
(define kc0 (second kbb))
(define kr1 (third kbb))
(define kc1 (fourth kbb))
(define kh (+ 1 (- kr1 kr0)))
(define kw (+ 1 (- kc1 kc0)))
;; Replicate key rows and columns independently to fill the frame interior.
(define rscale (quotient (- oh 2) kh))
(define cscale (quotient (- ow 2) kw))
(grid-from-fn oh ow
(lambda (r c)
(if (or (= r 0) (= c 0) (= r (- oh 1)) (= c (- ow 1)))
2
(at g
(+ kr0 (quotient (- r 1) rscale))
(+ kc0 (quotient (- c 1) cscale))))))))Provenance
- Generator
- generators/5da2f80a4a4f/generator.py
- Notes and decisions
- generators/5da2f80a4a4f/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- ff819cc96803491d7e32f1f2fd8cd6a2b9bcae826ee64328ad5e8d5c424e561b
- Rule hash
- 5501c0734c5a
- Sources
- training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 5da2f80a4a4f --count 1 --seed 20261108 --test 1