← 5b6cd8e8f3df · 5bba6e671cec →

5bb29951ab1a

Multiple same-color rectangles contain or flank a second-color dot set. Dots with at least two orthogonal rectangle-color neighbors are absorbed; one-neighbor and isolated dots are removed.

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* ((hh (rows g))
                  (ww (cols g))
                  (freq (make-hash))
                  (dummy (for* ((r (range 0 hh)) (c (range 0 ww)))
                               (hash-set! freq
                                          (at g r c)
                                          (+ 1 (hash-ref freq (at g r c) 0)))))
                  (sorted-colors (sort (hash-keys freq)
                                       (lambda (a b)
                                         (> (hash-ref freq a 0) (hash-ref freq b 0)))))
                  (bg 0)
                  (rect-color (find (lambda (c) (!= c bg)) sorted-colors))
                  (dot-color (find (lambda (c) (and (!= c bg) (!= c rect-color)))
                                   sorted-colors)))
             (build-grid hh
                         ww
                         (r c)
                         (if (= (at g r c) dot-color)
                             (let ((adj (for/sum ((d (list (list -1 0)
                                                    (list 1 0)
                                                    (list 0 -1)
                                                    (list 0 1))))
                                          (if (and
                                                (>= (+ r (first d)) 0)
                                                (< (+ r (first d)) hh)
                                                (>= (+ c (second d)) 0)
                                                (< (+ c (second d)) ww)
                                                (= (at g
                                                       (+ r (first d))
                                                       (+ c (second d)))
                                                   rect-color))
                                              1
                                              0))))
                               (if (>= adj 2) rect-color bg))
                             (at g r c)))))))

Provenance

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