← f68fe53c1702 · f705b8f51e62 →

f6b9f647b109

On a 0-background grid, find the unique red (2) and blue (1) endpoints. From red toward blue, take one diagonal step, then the required straight steps along the dominant axis, then the remaining diagonal steps. Paint only intermediate path cells green (3); preserve both endpoints. Every four consecutive generated demonstrations cover both dominant axes, compact and extended separations, all four directions, and at least two canonical-size anchors. Across sixteen slots, every direction crosses every axis/distance pair and the query recombines its repeated direction.

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))
         ;; Locate the unique red source endpoint.
         (red-pos
          (let loop ((r 0) (c 0))
            (cond
              ((>= r h) #f)
              ((>= c w) (loop (+ r 1) 0))
              ((= (at g r c) 2) (list r c))
              (else (loop r (+ c 1))))))
         ;; Locate the unique blue destination endpoint.
         (blue-pos
          (let loop ((r 0) (c 0))
            (cond
              ((>= r h) #f)
              ((>= c w) (loop (+ r 1) 0))
              ((= (at g r c) 1) (list r c))
              (else (loop r (+ c 1))))))
         (rr (first red-pos))
         (rc (second red-pos))
         (br (first blue-pos))
         (bc (second blue-pos))
         ;; Unit signs point from red toward blue.
         (drow (if (> br rr) 1 -1))
         (dcol (if (> bc rc) 1 -1))
         (dr-abs (abs (- br rr)))
         (dc-abs (abs (- bc rc)))
         (max-d (if (> dr-abs dc-abs) dr-abs dc-abs))
         ;; The gap difference is the dominant-axis middle phase length.
         (straights (- max-d (if (> dr-abs dc-abs) dc-abs dr-abs)))
         (is-vert (> dr-abs dc-abs))
         ;; Build interior cells in order: one diagonal, dominant-axis
         ;; straights, then the remaining diagonals into blue.
         (path-cells
          (let loop ((step 1) (cur-r rr) (cur-c rc) (acc (list)))
            (cond
              ((>= step max-d) (reverse acc))
              (else
               (let* ((new-r-c
                       (cond
                         ;; Phase 1: the mandatory first diagonal.
                         ((= step 1) (list (+ cur-r drow) (+ cur-c dcol)))
                         ;; Phase 2: contiguous dominant-axis steps.
                         ((<= step (+ 1 straights))
                          (if is-vert
                              (list (+ cur-r drow) cur-c)
                              (list cur-r (+ cur-c dcol))))
                         ;; Phase 3: trailing diagonals.
                         (else (list (+ cur-r drow) (+ cur-c dcol)))))
                      (nr (first new-r-c))
                      (nc (second new-r-c)))
                 (loop (+ step 1) nr nc (cons (list nr nc) acc))))))))
    ;; Paint only path interiors green; keep both endpoint colors unchanged.
    (for/fold ((out g)) ((cell path-cells))
      (set-cell out (first cell) (second cell) 3)))))

Provenance

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