← 0083f06314c3 · 00b92ce63593 →
00a3a71adae9
Two to four separated color-2 motifs and a color-1 mask teach the full canonical selector precedence: square-growth overlap, then Manhattan distance, then top-left scan order. The selected original motif is cropped and recolored 8.
counterfactual overlap scoringmask interactionobject selection
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 square-offsets (for*/list ((dr (in-range -1 2)) (dc (in-range -1 2))) (list dr dc))) (define (points-of grid color) (sort (find-color grid color) cell<)) (define (grow-from-centers grid centers offsets) (remove-duplicates (filter (lambda (p) (in-bounds? (first p) (second p) (rows grid) (cols grid))) (flatmap (lambda (p) (map (lambda (d) (list (+ (first p) (first d)) (+ (second p) (second d)))) offsets)) centers)))) (define (mask-intersection a b) (filter (lambda (p) (member p b)) a)) (define (crop-cells cells (color 8)) (let* ((bb (bbox-of-cells cells)) (r1 (first bb)) (c1 (second bb)) (r2 (third bb)) (c2 (fourth bb)) (norm (map (lambda (p) (list (- (first p) r1) (- (second p) c1))) cells))) (paint-cells (empty-grid (+ 1 (- r2 r1)) (+ 1 (- c2 c1)) 0) norm color))) (define (obj< a b) (let ((ba (obj-bbox a)) (bb (obj-bbox b))) (if (= (first ba) (first bb)) (< (second ba) (second bb)) (< (first ba) (first bb))))) (define (distance-to-set p cells) (apply min (map (lambda (q) (+ (abs (- (first p) (first q))) (abs (- (second p) (second q))))) cells))) (let* ((mask (points-of g 1)) (objs (sort (filter (lambda (o) (= (obj-color o) 2)) (objects g 0)) obj<)) (best (first (sort objs (lambda (a b) (let* ((ga (grow-from-centers g (obj-cells a) square-offsets)) (gb (grow-from-centers g (obj-cells b) square-offsets)) (sa (length (mask-intersection ga mask))) (sb (length (mask-intersection gb mask))) (da (apply min (map (lambda (p) (distance-to-set p mask)) ga))) (db (apply min (map (lambda (p) (distance-to-set p mask)) gb)))) (cond ((not (= sa sb)) (> sa sb)) ((not (= da db)) (< da db)) (else (obj< a b))))))))) (crop-cells (obj-cells best) 8))))
Provenance
- Generator
- generators/00a3a71adae9/generator.py
- Notes and decisions
- generators/00a3a71adae9/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 81c6903b1c51bdd1c173400770cf4f16bf7be49f963b877737085f6790707d62
- Rule hash
- cdd6424b9ac7
- Sources
- bank:1f065edbcf08
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 00a3a71adae9 --count 1 --seed 20261108 --test 1