← 249b59452da6 · 24bb2221ca5c →
24b83272f157
Recolor each same-color 4-connected object by the number of other objects whose one-step orthogonal contact halos overlap: degree 0/1/2/3/4+ becomes red/green/cyan/magenta/maroon (2/3/8/6/9).
parametric familyobjectsrecolorrelationstopology
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 (dilate-cells cells h w) (remove-duplicates (apply append (map (lambda (p) (cons p (filter (lambda (q) (in-bounds? (first q) (second q) h w)) (map (lambda (d) (list (+ (first p) (first d)) (+ (second p) (second d)))) cardinal-deltas)))) cells)))) (let* ((objs (objects g 0)) (dilations (map (lambda (obj) (dilate-cells (obj-cells obj) (rows g) (cols g))) objs)) (mapping (list (list 0 2) (list 1 3) (list 2 8) (list 3 6) (list 4 9)))) (for/fold ((out (empty-grid (rows g) (cols g) 0))) ((obj (in-list objs)) (i (in-naturals))) (let* ((degree (for/sum ((j (in-range (length objs)))) (if (or (= i j) (empty? (filter (lambda (p) (member? p (list-ref dilations j))) (list-ref dilations i)))) 0 1))) (hit (filter (lambda (row) (= (first row) degree)) mapping)) (newc (if (empty? hit) 9 (second (first hit))))) (paint-cells out (obj-cells obj) newc))))))
Provenance
- Generator
- generators/24b83272f157/generator.py
- Notes and decisions
- generators/24b83272f157/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 356af3ba309ece3c2b4b4250b8a2ba5ac421622504758944b99aee8a1117c2a0
- Rule hash
- ede817c8e772
- Sources
- bank:04c7711cefc4
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate 24b83272f157 --count 1 --seed 20261108 --test 1