← 67a09b7f6b66 · 67c14e0f76b1 →

67aae675d447

Two orthogonal color tripods define independent source (2/3/4) and target (5/6/7) coordinates. Take source-local color-8 cells within radius 3 and paint only their bounding-box perimeter in color 8 at the target frame.

outline extraction, local abstractions, frame-relative rendering

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!
 ;; Corner triads define local coordinate FRAMES: a 2 with orthogonal
 ;; 3/4 neighbors is the SOURCE, a 5 with 6/7 the TARGET. Read the
 ;; source's motif of 8s in local coordinates and draw its bounding
 ;; box OUTLINE in 8s through the target frame.
 (lambda (g)
   (let ()
     (define (point< a b)
       (cond ((not (= (first a) (first b))) (< (first a) (first b)))
             ((not (= (second a) (second b))) (< (second a) (second b)))
             (else (< (third a) (third b)))))
     (define (gpos f u v)
       (list (+ (first (first f)) (* u (first (second f)))
                (* v (first (third f))))
             (+ (second (first f)) (* u (second (second f)))
                (* v (second (third f))))))
     (define (lpos f p)
       (let ((dr (- (first p) (first (first f))))
             (dc (- (second p) (second (first f)))))
         (list (+ (* dr (first (second f))) (* dc (second (second f))))
               (+ (* dr (first (third f))) (* dc (second (third f)))))))
     (define (frame< a b)
       (let loop ((xs (append (first a) (second a) (third a)))
                  (ys (append (first b) (second b) (third b))))
         (cond ((null? xs) #f)
               ((< (first xs) (first ys)) #t)
               ((> (first xs) (first ys)) #f)
               (else (loop (rest xs) (rest ys))))))
     (define (find-frames a b c)
       (sort (remove-duplicates
              (filter (lambda (x) x)
                      (for*/list ((r (in-range h)) (col (in-range w))
                                  (dx (in-list cardinal-deltas))
                                  (dy (in-list cardinal-deltas)))
                        (and (= (at g r col) a)
                             (in-bounds? (+ r (first dx))
                                         (+ col (second dx)) h w)
                             (in-bounds? (+ r (first dy))
                                         (+ col (second dy)) h w)
                             (= (at g (+ r (first dx))
                                    (+ col (second dx)))
                                b)
                             (= (at g (+ r (first dy))
                                    (+ col (second dy)))
                                c)
                             (zero? (+ (* (first dx) (first dy))
                                       (* (second dx) (second dy))))
                             (list (list r col) dx dy)))))
             frame<))
     (define (motif-uvs f)  ;; the 8-cells in local coords, radius 3
       (sort (filter (lambda (x) x)
                     (for*/list ((r (in-range h)) (c (in-range w)))
                       (and (= (at g r c) 8)
                            (let ((uv (lpos f (list r c))))
                              (and (<= (max (abs (first uv))
                                            (abs (second uv)))
                                       3)
                                   (list (first uv) (second uv) 8))))))
             point<))
     (define sf (first (find-frames 2 3 4)))
     (define tf (first (find-frames 5 6 7)))
     (define uvs (map (lambda (p) (list (first p) (second p)))
                      (motif-uvs sf)))
     (define u0 (min-of first uvs))
     (define v0 (min-of second uvs))
     (define u1 (max-of first uvs))
     (define v1 (max-of second uvs))
     (for*/fold ((out g)) ((u (in-range u0 (+ u1 1)))
                           (v (in-range v0 (+ v1 1))))
       (if (or (= u u0) (= u u1) (= v v0) (= v v1))
           (let ((rc (gpos tf u v)))
             (set-cell out (first rc) (second rc) 8))
           out)))))

Provenance

Generator
generators/67aae675d447/generator.py
Notes and decisions
generators/67aae675d447/notes.md
Review label
reviewed_safe
Generator SHA-256
3406acbb2c2873b35b1349859dcdcaa70263634557e717349226d9d4211880a6
Rule hash
e0f86f3cb6ab
Sources
bank:f05110b6a734
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 67aae675d447 --count 1 --seed 20261108 --test 1