← public_eval_e12f9a14 · public_eval_e376de54 →
public_eval_e3721c99
Count enclosed four-connected cavities and apply the scene legend
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!
(define os (objects g 0))
(define (cavities o)
(define bh (obj-h o))
(define bw (obj-w o))
(define mask
(build-grid bh bw (r c)
(if (member (list (+ r (obj-r1 o)) (+ c (obj-c1 o))) (obj-cells o)) 0 1)))
(filter (lambda (z) (and (> (obj-r1 z) 0) (> (obj-c1 z) 0)
(< (obj-r2 z) (- bh 1)) (< (obj-c2 z) (- bw 1))))
(objects mask 0)))
(define legends
(filter (lambda (o) (and (not (= (obj-color o) 5))
(> (obj-r1 o) 0) (> (obj-c1 o) 0)
(< (obj-r2 o) (- h 1)) (< (obj-c2 o) (- w 1)))) os))
(define mapping (map (lambda (o) (list (length (cavities o)) (obj-color o))) legends))
(define payload (filter (lambda (o) (= (obj-color o) 5)) os))
(for/fold ([out g]) ([o payload])
(define regions (cavities o))
(define n (length regions))
(define matches (filter (lambda (p) (= (first p) n)) mapping))
(define color (if (null? matches) 0 (second (pick-max matches first))))
(recolor-cells out (obj-cells o) color)))
Provenance
- Generator
- generators/public_eval_e3721c99/generator.py
- Notes and decisions
- generators/public_eval_e3721c99/notes.md
- Review label
- reviewed_safe
- Generator SHA-256
- 051e30079b5ad8b6c8d2d8e0bb06474754497113e71e93a63e80f7faff6fb5bf
- Rule hash
- 8e09539cd65f
- Sources
- evaluation, public_eval:e3721c99
- Lesson seeds
- 20261108, 20261109, 20261110, 20261111, 20261112
- Reproduce lesson 1
arcpuzzles generate public_eval_e3721c99 --count 1 --seed 20261108 --test 1