← 779c7c31edc3 · 78143e5d7ed1 →

77e3acd21c5d

A background-colored grid contains one solid monochrome rectangle and 2–5 separated two-color rectangles. Select the widest two-color rectangle, treat its minority color as markers, and create an output the size/color of the monochrome rectangle. Transfer each marker by its distance from the nearest source edges; exact edge ties mirror to both sides, and out-of-bounds projections are dropped.

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!
 ;; Two rectangles: a plain EMPTY one and a (widest) SOURCE stamped
 ;; with marker dots. Rebuild the empty rectangle with the markers
 ;; transferred edge-relative: each marker keeps its distance to its
 ;; NEAREST edge on each axis; an exact tie mirrors it to both sides.
 (lambda (g)
   (let ()
     (define bg (at g 0 0))
     (define objs (objects-multicolor g bg))
     (define (colors-of o)
       (unique (map (lambda (p) (at g (first p) (second p)))
                    (obj-cells o))))
     (define blank (find (lambda (o) (= 1 (length (colors-of o)))) objs))
     (define blank-color (first (colors-of blank)))
     (define eh (obj-h blank))
     (define ew (obj-w blank))
     (define source
       (pick-max (filter (lambda (o) (> (length (colors-of o)) 1)) objs)
                 obj-w))
     (define rect-color  ;; the source's majority (frame) color
       (pick-max (colors-of source)
                 (lambda (c) (count-if (lambda (p)
                                         (= (at g (first p) (second p))
                                            c))
                                       (obj-cells source)))))
     (define marker-color
       (find-first (lambda (c) (not (= c rect-color)))
                   (colors-of source)))
     (define markers  ;; marker positions relative to the source bbox
       (map (lambda (p) (list (- (first p) (obj-r1 source))
                              (- (second p) (obj-c1 source))))
            (filter (lambda (p) (= (at g (first p) (second p))
                                   marker-color))
                    (obj-cells source))))
     (define (anchors mr mc)  ;; landing spots in the empty rectangle
       (let* ((bot (- (obj-h source) 1 mr))
              (right (- (obj-w source) 1 mc))
              (rrs (cond ((< mr bot) (list mr))
                         ((> mr bot) (list (- eh 1 bot)))
                         (else (list mr (- eh 1 bot)))))
              (ccs (cond ((< mc right) (list mc))
                         ((> mc right) (list (- ew 1 right)))
                         (else (list mc (- ew 1 right))))))
         (filter (lambda (rc) (in-bounds? (first rc) (second rc) eh ew))
                 (for*/list ((r rrs) (c ccs)) (list r c)))))
     (paint-cells (empty-grid eh ew blank-color)
                  (flatmap (lambda (m) (anchors (first m) (second m)))
                           markers)
                  marker-color))))

Provenance

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