← 2f91d0756f23 · 2fb8d019f6ca →

2fb0197be694

A 6-16 cell rectangular 0-background grid contains exactly one local coordinate frame: color 2 is the origin, color 3 marks local (1,0), and color 4 marks local (0,1). The orthogonal unit basis may use any of the eight directed D4 orientations. A non-empty subset of the four local offsets (2,0), (0,2), (1,1), and (2,2) is colored 8. Output is a 1x4 strip in that fixed offset order, using 8 for occupied and 0 for empty. Default episodes use a cyclic 15-mask curriculum whose every three consecutive demonstrations toggle all four strip positions.

parametric familysymbolic output, local-coordinate lookup, feature extraction

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! (let ((dummy 0)) (define (uv< a b) (if (= (first a) (first b)) (< (second a) (second b)) (< (first a) (first b)))) (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 (make-frame origin vx vy colors) (list origin vx vy colors)) (define (frame-origin f) (first f)) (define (frame-vx f) (second f)) (define (frame-vy f) (third f)) (define (frame< a b) (let ((oa (frame-origin a)) (ob (frame-origin b)) (vxa (frame-vx a)) (vxb (frame-vx b)) (vya (frame-vy a)) (vyb (frame-vy b))) (cond ((not (= (first oa) (first ob))) (< (first oa) (first ob))) ((not (= (second oa) (second ob))) (< (second oa) (second ob))) ((not (= (first vxa) (first vxb))) (< (first vxa) (first vxb))) ((not (= (second vxa) (second vxb))) (< (second vxa) (second vxb))) ((not (= (first vya) (first vyb))) (< (first vya) (first vyb))) (else (< (second vya) (second vyb)))))) (define (lpos frame p) (let* ((origin (frame-origin frame)) (dr (- (first p) (first origin))) (dc (- (second p) (second origin))) (vx (frame-vx frame)) (vy (frame-vy frame))) (list (+ (* dr (first vx)) (* dc (second vx))) (+ (* dr (first vy)) (* dc (second vy)))))) (define (find-frames grid colors) (let* ((a (first colors)) (b (second colors)) (c (third colors)) (raw (filter values (for*/list ((r (in-range (rows grid))) (col (in-range (cols grid))) (dx (in-list cardinal-deltas)) (dy (in-list cardinal-deltas))) (let* ((xr (+ r (first dx))) (xc (+ col (second dx))) (yr (+ r (first dy))) (yc (+ col (second dy)))) (if (and (= (at grid r col) a) (in-bounds? xr xc (rows grid) (cols grid)) (in-bounds? yr yc (rows grid) (cols grid)) (= (at grid xr xc) b) (= (at grid yr yc) c) (= (+ (* (first dx) (first dy)) (* (second dx) (second dy))) 0)) (make-frame (list r col) dx dy colors) #f)))))) (sort (remove-duplicates raw) frame<))) (define (extract-local-points grid frame colors radius) (let ((rad (min radius 3))) (sort (filter values (for*/list ((r (in-range (rows grid))) (c (in-range (cols grid)))) (let ((v (at grid r c))) (if (member? v colors) (let ((uv (lpos frame (list r c)))) (if (<= (max (abs (first uv)) (abs (second uv))) rad) (list (first uv) (second uv) v) #f)) #f)))) point<))) (define (point-uv p) (list (first p) (second p))) (define (point-uvs points) (map point-uv points)) (define (canonical-uvs uvs) (sort uvs uv<)) (define canon-e7 (list (list 2 0) (list 0 2) (list 1 1) (list 2 2))) (let* ((sf (first (find-frames g (list 2 3 4)))) (uvs (canonical-uvs (point-uvs (extract-local-points g sf (list 8) 4))))) (grid-from-fn 1 (length canon-e7) (lambda (r c) (if (member? (list-ref canon-e7 c) uvs) 8 0))))))

Provenance

Generator
generators/2fb0197be694/generator.py
Notes and decisions
generators/2fb0197be694/notes.md
Review label
reviewed_safe
Generator SHA-256
6566fd91ff79bf1da400073937d780ccf705fd14dccf96e095c624db8ae759e9
Rule hash
eb3e8f5d9da4
Sources
bank:f05110b6a734
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 2fb0197be694 --count 1 --seed 20261108 --test 1