← 084de7b050a1 · 08eaba8254b2 →
089c14df9952
Find the unique yellow-4 component decorated with colors 1, 2, and 3. For each plain or red-hinted yellow twin, identify the D4 orientation of the base skeleton and stamp the complete blue/red/green decoration in that orientation; decoration cells outside the grid are clipped.
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!
;; Yellow(4) skeletons repeat around the board; the richest one (most
;; decoration colors) is the BASE. For each plain copy, find the
;; dihedral orientation mapping the base skeleton onto it — a red(2)
;; cell breaks symmetric ties — and stamp the base's decorations
;; through that orientation.
(lambda (g)
(let ()
(define (val p) (at g (first p) (second p)))
(define comps
(filter (lambda (o) (any? (lambda (p) (= (val p) 4))
(obj-cells o)))
(objects-multicolor g 0)))
(define (deco-colors o)
(remove-duplicates (filter (lambda (v) (not (= v 4)))
(map val (obj-cells o)))))
(define base (pick-max comps (lambda (o) (length (deco-colors o)))))
(define (spin p idx) ;; the 8 dihedral images of a cell
(let ((r (first p)) (c (second p)))
(cond ((zero? idx) (list r c))
((= idx 1) (list c (- r)))
((= idx 2) (list (- r) (- c)))
((= idx 3) (list (- c) r))
((= idx 4) (list r (- c)))
((= idx 5) (list (- c) (- r)))
((= idx 6) (list (- r) c))
(else (list c r)))))
(define (sort-pos cells) (sort cells cell<))
(define (yellows o) (filter (lambda (p) (= (val p) 4))
(obj-cells o)))
(define (rel cells r0 c0)
(map (lambda (p) (list (- (first p) r0) (- (second p) c0)))
cells))
(define base-y (yellows base))
(define by-r0 (min-of first base-y))
(define by-c0 (min-of second base-y))
(define base-yrel (sort-pos (rel base-y by-r0 by-c0)))
(define base-deco ;; (dr dc color) for the base's decorations
(map (lambda (p) (list (- (first p) by-r0)
(- (second p) by-c0)
(val p)))
(filter (lambda (p) (not (= (val p) 4))) (obj-cells base))))
(define base-twos
(map (lambda (e) (list (first e) (second e)))
(filter (lambda (e) (= (third e) 2)) base-deco)))
(define (rel-after idx p) ;; spin, then re-anchor on the skeleton
(let* ((raws (map (lambda (q) (spin q idx)) base-yrel))
(raw (spin p idx)))
(list (- (first raw) (min-of first raws))
(- (second raw) (min-of second raws)))))
(for/fold ((out g)) ((obj (in-list comps)))
(if (> (length (deco-colors obj)) 1)
out
(let* ((ys (yellows obj))
(tr0 (min-of first ys))
(tc0 (min-of second ys))
(target-yrel (sort-pos (rel ys tr0 tc0)))
(target-twos
(sort-pos (rel (filter (lambda (p) (= (val p) 2))
(obj-cells obj))
tr0 tc0)))
(idx (find-first
(lambda (idx)
(and (equal? (sort-pos
(map (lambda (p)
(rel-after idx p))
base-yrel))
target-yrel)
(or (empty? target-twos)
(any? (lambda (bp)
(member (rel-after idx bp)
target-twos))
base-twos))))
(range 0 8))))
(if idx
(for/fold ((gg out)) ((e (in-list base-deco)))
(let ((p (rel-after idx (list (first e)
(second e)))))
(if (in-bounds? (+ tr0 (first p))
(+ tc0 (second p)) h w)
(set-cell gg (+ tr0 (first p))
(+ tc0 (second p)) (third e))
gg)))
out)))))))Provenance
- Generator
- generators/089c14df9952/generator.py
- Notes and decisions
- generators/089c14df9952/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 029aff1e3ba3c7cc48e45ef32d24dd3e4bbe466549b2b75b91538cfb863e4041
- Rule hash
- 1fa4f01a8b99
- Sources
- augmented, training
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 089c14df9952 --count 1 --seed 20261108 --test 1