← 691d467ddb4d · 694d3ee0b12a →
693aba8e59d8
Use the connected color-6 object as a template. At each of the four single-cell anchors, stamp a centered copy rotated according to the anchor color: 1 = identity, 2 = clockwise 90°, 3 = 180°, 4 = counterclockwise 90°. Output only the four color-6 stamps.
parametric familyanchorsrotationstamping
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 (obj< a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (if (= (first ba) (first bb)) (< (second ba) (second bb)) (< (first ba) (first bb))))) (define (bbox-h bb) (+ 1 (- (third bb) (first bb)))) (define (bbox-w bb) (+ 1 (- (fourth bb) (second bb)))) (define (object-grid obj) (let* ((bb (obj-bbox obj)) (h (bbox-h bb)) (w (bbox-w bb)) (norm (normalize-cells (obj-cells obj)))) (paint-cells (empty-grid h w 0) norm (obj-color obj)))) (define (stamp-grid-nonzero out sub tr tc) (foldl (lambda (cell acc) (let* ((r (+ tr (first cell))) (c (+ tc (second cell))) (v (third cell))) (if (and (not (= v 0)) (in-bounds? r c (rows acc) (cols acc))) (set-cell acc r c v) acc))) out (grid-cells sub))) (define (rotate-anchor-grid sub code) (cond ((= code 1) sub) ((= code 2) (rotate-cw sub)) ((= code 3) (rotate-180 sub)) ((= code 4) (rotate-ccw sub)) (else sub))) (let* ((base (first (sort (filter (lambda (o) (= (obj-color o) 6)) (objects g 0)) obj<))) (base-grid (object-grid base)) (anchors (sort (filter (lambda (cell) (member (third cell) (list 1 2 3 4))) (grid-cells g)) (lambda (a b) (cell< (list (first a) (second a)) (list (first b) (second b))))))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((anchor (in-list anchors))) (let* ((sub (rotate-anchor-grid base-grid (third anchor))) (tr (- (first anchor) (quotient (rows sub) 2))) (tc (- (second anchor) (quotient (cols sub) 2)))) (stamp-grid-nonzero out sub tr tc))))))
Provenance
- Generator
- generators/693aba8e59d8/generator.py
- Notes and decisions
- generators/693aba8e59d8/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 1f679f1ceaafe69b4edd87c97d47ed0cf1765ae85e48907ce940dc3478bbfdcf
- Rule hash
- 60c823b90a2d
- Sources
- bank:cf5246d38569
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 693aba8e59d8 --count 1 --seed 20261108 --test 1