← dc155169ea57 · dc382c7da9a9 →

dc2c4869445c

Each seed cell mirrors its group's main shape across the indicated bbox side.

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)))
           (let* ((groups (objects-multicolor g 0)))
             (for/fold ((out g))
               ((grp groups))
               (let* ((cells (obj-cells grp))
                      (cell-colors (map (lambda (cell)
                                          (list (first cell)
                                                (second cell)
                                                (at g (first cell) (second cell))))
                                        cells))
                      (colors (remove-duplicates (map third cell-colors)))
                      (color-counts (map (lambda (col)
                                           (list col
                                                 (count-if (lambda (cc)
                                                             (= (third cc) col))
                                                           cell-colors)))
                                         colors))
                      (sorted (sort color-counts
                                    (lambda (a b) (> (second a) (second b)))))
                      (main-color (first (first sorted)))
                      (main-cells (filter (lambda (cc) (= (third cc) main-color))
                                          cell-colors))
                      (mrs (map first main-cells))
                      (mcs (map second main-cells))
                      (mr1 (min-list mrs))
                      (mr2 (max-list mrs))
                      (mc1 (min-list mcs))
                      (mc2 (max-list mcs))
                      (seeds (filter (lambda (cc) (!= (third cc) main-color))
                                     cell-colors)))
                 (for/fold ((gg out))
                   ((seed seeds))
                   (let* ((sr (first seed))
                          (sc (second seed))
                          (scolor (third seed))
                          (dir-r (cond
                                   ((< sr mr1) 'above)
                                   ((> sr mr2) 'below)
                                   (else 'mid)))
                          (dir-c (cond
                                   ((< sc mc1) 'left)
                                   ((> sc mc2) 'right)
                                   (else 'mid))))
                     (for/fold ((ggg gg))
                       ((mc main-cells))
                       (let* ((mr (first mc))
                              (mcl (second mc))
                              (nr (cond
                                    ((eq? dir-r 'above) (- (- (* 2 mr1) 1) mr))
                                    ((eq? dir-r 'below) (- (+ (* 2 mr2) 1) mr))
                                    (else mr)))
                              (nc (cond
                                    ((eq? dir-c 'left) (- (- (* 2 mc1) 1) mcl))
                                    ((eq? dir-c 'right) (- (+ (* 2 mc2) 1) mcl))
                                    (else mcl))))
                         (cond
                           ((or (< nr 0) (>= nr h) (< nc 0) (>= nc w)) ggg)
                           (else (set-cell ggg nr nc scolor)))))))))))))

Provenance

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