← e1fc836c1922 · e250cb77a62e →
e245314f96d8
Find same-color 4-connected nonzero objects, count how many other objects touch each one cardinally, and recolor the whole object by degree: 0->3, 1->4, 2->6, and 3+->8.
parametric familycomponent abstractionglobal recolorgraph degree
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 (adjacent? grid a b) (any? (lambda (p) (any? (lambda (d) (member (list (+ (first p) (first d)) (+ (second p) (second d))) (obj-cells b))) cardinal-deltas)) (obj-cells a))) (define (neighbors grid objs i) (filter (lambda (j) (and (not (= i j)) (adjacent? grid (list-ref objs i) (list-ref objs j)))) (range 0 (length objs)))) (define (degree grid objs i) (length (neighbors grid objs i))) (define objs (objects g 0)) (define (degree-color d) (cond ((= d 0) 3) ((= d 1) 4) ((= d 2) 6) (else 8))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((i (in-range (length objs)))) (paint-cells out (obj-cells (list-ref objs i)) (degree-color (degree g objs i))))))
Provenance
- Generator
- generators/e245314f96d8/generator.py
- Notes and decisions
- generators/e245314f96d8/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 485bc3a650812cd658e07d924e7f0c1cece79609935a3420b4226e15a1222408
- Rule hash
- 12d5c7d2dc6c
- Sources
- bank:3a1815be7c2e
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate e245314f96d8 --count 1 --seed 20261108 --test 1