← public_eval_7ed72f31 · public_eval_80a900e0 →
public_eval_800d221b
Propagate chamber majorities along wires and vote at the central hub.
parametric family
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!
;; The modal background surrounds a spatially spanning wire network.
;; Its unique solid 3x3 hub joins mixed-color terminal chambers. Remove the
;; hub to recover the terminals; each terminal's pigment majority colors its
;; own wires. The hub center takes a second majority, counting the recovered
;; terminal value once per external wire contact, not once per chamber.
;; All original pigments and the other eight hub cells remain unchanged.
;; Lower colors break vote ties; generated lessons exclude all such ties.
(lambda (g)
(let ()
(define (mode-color xs)
(pick-max (sort (remove-duplicates xs) <)
(lambda (v) (count-if (lambda (x) (= x v)) xs))))
(define bg (mode-color (apply append g)))
(define network
(pick-max (objects g bg) (lambda (o) (* (obj-h o) (obj-w o)))))
(define wire (obj-color network))
(define centers
(for*/list ([r (range 1 (- h 1))] [c (range 1 (- w 1))]
#:when (for*/and ([dr '(-1 0 1)] [dc '(-1 0 1)])
(= (at g (+ r dr) (+ c dc)) wire)))
(list r c)))
(define center (first centers))
(define hr (first center))
(define hc (second center))
(define (in-hub? r c)
(and (<= (- hr 1) r (+ hr 1)) (<= (- hc 1) c (+ hc 1))))
(define mask
(for/list ([r (range h)])
(for/list ([c (range w)])
(if (or (in-hub? r c) (= (at g r c) bg)) bg wire))))
(define terminals
(for/list ([o (objects mask bg)])
(let ()
(define cells (obj-cells o))
(define pigments
(for/list ([p cells] #:when (not (= (at g (first p) (second p)) wire)))
(at g (first p) (second p))))
(define local-vote (mode-color pigments))
(define contacts
(for/sum ([p cells])
(let ([r (first p)] [c (second p)])
(if (and (= (at g r c) wire)
(or (in-hub? (- r 1) c) (in-hub? (+ r 1) c)
(in-hub? r (- c 1)) (in-hub? r (+ c 1)))) 1 0))))
(list cells local-vote contacts))))
(define votes
(apply append
(for/list ([terminal terminals])
(make-list (third terminal) (second terminal)))))
(define propagated
(for/fold ([out g]) ([terminal terminals])
(for/fold ([result out]) ([p (first terminal)])
(if (= (at g (first p) (second p)) wire)
(set-cell result (first p) (second p) (second terminal)) result))))
(set-cell propagated hr hc (mode-color votes)))))
Provenance
- Generator
- generators/public_eval_800d221b/generator.py
- Notes and decisions
- generators/public_eval_800d221b/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 232f94a1f0df05e00661a6385a6eeaf0b8abb5812d2a82d2005f9b9c0a7a7ab6
- Rule hash
- 4ec1c8bbc829
- Sources
- evaluation, public_eval:800d221b
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_800d221b --count 1 --seed 20261108 --test 1