← ff5ef89054d2 · ff973026bfbe →

ff76baf6c2d9

Place one or two multicolor templates, each with one uniquely occurring anchor color and a repeated carrier color. Isolated cells matching each anchor request complete copies of that template; anchor color 2 mirrors the copy horizontally, while all other anchor colors preserve it.

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! (lambda (g)
         (let* ((h (rows g))
                (w (cols g)))
           (begin
             (define comps (objects-multicolor g 0))
             (define singles (filter (lambda (o) (= (obj-size o) 1)) comps))
             (define sources
               (filter (lambda (o)
                         (and
                           (> (obj-size o) 1)
                           (> (length (unique (map (lambda (p) (at g (fst p) (snd p)))
                                                   (obj-cells o))))
                              1)))
                       comps))
             (define (contains-cell? cells p)
               (not (empty? (filter (lambda (q)
                                      (and (= (fst q) (fst p)) (= (snd q) (snd p))))
                                    cells))))
             (reduce (lambda (acc src)
                       (let* ((cells (obj-cells src))
                              (colors (unique (map (lambda (p) (at g (fst p) (snd p)))
                                                   cells))))
                         (reduce (lambda (acc2 anchor-color)
                                   (let ((anchors (filter (lambda (p)
                                                            (= (at g (fst p) (snd p))
                                                               anchor-color))
                                                          cells))
                                         (targets (filter (lambda (o)
                                                            (= (at g
                                                                   (fst (fst (obj-cells o)))
                                                                   (snd (fst (obj-cells o))))
                                                               anchor-color))
                                                          singles)))
                                     (if (!= (length anchors) 1)
                                         acc2
                                         (let ((anchor (fst anchors)))
                                           (reduce (lambda (a target-obj)
                                                     (let ((target (fst (obj-cells target-obj))))
                                                       (if (contains-cell? cells target)
                                                           a
                                                           (reduce (lambda (aa cell)
                                                                     (let* ((v (at g
                                                                                   (fst cell)
                                                                                   (snd cell)))
                                                                            (dr (- (fst cell)
                                                                                   (fst anchor)))
                                                                            (dc (- (snd cell)
                                                                                   (snd anchor)))
                                                                            (nr (+ (fst target)
                                                                                   dr))
                                                                            (nc (+ (snd target)
                                                                                   (if (= anchor-color
                                                                                          2)
                                                                                       (- dc)
                                                                                       dc))))
                                                                       (if (and
                                                                             (not (and
                                                                                    (zero? dr)
                                                                                    (zero? dc)))
                                                                             (in-bounds? nr
                                                                                         nc
                                                                                         (rows g)
                                                                                         (cols g)))
                                                                           (set-cell aa
                                                                                     nr
                                                                                     nc
                                                                                     v)
                                                                           aa)))
                                                                   a
                                                                   cells))))
                                                   acc2
                                                   targets)))))
                                 acc
                                 (range 1 10))))
                     g
                     sources)))))

Provenance

Generator
generators/ff76baf6c2d9/generator.py
Notes and decisions
generators/ff76baf6c2d9/notes.md
Review label
reviewed_safe
Generator SHA-256
2a34c30b086a28f6f71b5743cff1203d73c7528e0dc1f5658476f421b0b7c80c
Rule hash
d31dc299f026
Sources
training
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate ff76baf6c2d9 --count 1 --seed 20261108 --test 1