← 4cfd24806fb2 · 4d3c5600ffbd →

4d0f228177b0

A square 9..11 zero-background grid contains one copy at most of cue colors 1, 2, 3, and 6. Color 6 grows upward into a seven-cell vertical segment, color 3 grows downward into a four-cell vertical segment, color 1 grows a two-cell right arm with a second 1 above its tip, and color 2 is the right endpoint of a five-cell horizontal segment centered on the rightmost non-2 cue to its left. If that horizontal segment crosses the interior of a 6/3 vertical segment, paint a yellow diagonal down-left from the crossing. Ordinary seven-demo lessons cover every canonical cue configuration before querying the same rule on a new placement.

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 pts (filter (lambda (cell) (!= (third cell) 0)) (grid-cells g)))
             (define (put gg r c v) (if (in-bounds? r c h w) (set-cell gg r c v) gg))
             (define vsegments
               (filter identity
                       (map (lambda (p)
                              (let ((r (first p))
                                    (c (second p))
                                    (v (third p)))
                                (cond
                                  ((= v 6) (list c (- r 6) r))
                                  ((= v 3) (list c r (+ r 3)))
                                  (else #f))))
                            pts)))
             (define after-vertical
               (for/fold ((out g))
                 ((seg vsegments))
                 (let ((c (first seg))
                       (top (second seg))
                       (bot (third seg)))
                   (for/fold ((gg out))
                     ((rr (range top (+ bot 1))))
                     (put gg
                          rr
                          c
                          (if (or (= rr top) (= rr bot)) (if (= (- bot top) 6) 6 3) 5))))))
             (define after-one
               (for/fold ((out after-vertical))
                 ((p pts))
                 (let ((r (first p))
                       (c (second p))
                       (v (third p)))
                   (if (= v 1)
                       (put (put (put (put out (- r 1) (+ c 2) 1) r c 1) r (+ c 1) 5)
                            r
                            (+ c 2)
                            5)
                       out))))
             (define (segment-at c)
               (find-first (lambda (seg) (= (first seg) c)) vsegments))
             (for/fold ((out after-one))
               ((p pts))
               (let ((r (first p))
                     (c (second p))
                     (v (third p)))
                 (if (!= v 2)
                     out
                     (let* ((left-cols (map second
                                            (filter (lambda (q)
                                                      (and
                                                        (!= (third q) 2)
                                                        (< (second q) c)))
                                                    pts)))
                            (center (if (null? left-cols) (- c 1) (max-list left-cols)))
                            (seg (segment-at center))
                            (horiz (for/fold ((gg out))
                                     ((cc (range (- center 2) (+ center 3))))
                                     (put gg
                                          r
                                          cc
                                          (if (or
                                                (= cc (- center 2))
                                                (= cc (+ center 2)))
                                              2
                                              5)))))
                       (if (and seg (< (second seg) r) (< r (third seg)))
                           (for/fold ((gg horiz))
                             ((k (range 0 (max h w))))
                             (put gg (+ r k) (- center k) 4))
                           horiz)))))))))

Provenance

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