← public_eval_6ffbe589 · public_eval_7491f3cf →

public_eval_71e489b6

Outline thin black defects and remove stray blue impulses in binary fields.

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!
 ;; Binary fields contain thin black defects and stray blue impulses/tips.
 ;; Detect BOTH kinds on the original grid, preserving narrow structural channels.
 ;; Erase stray blue, then outline black defects in orange using 8-neighbors.
 ;; A solid 2x2 core distinguishes structural components from thin defects.
 (lambda (g)
  (let ()
   (define (adj p ds)
     (filter (lambda (q) (in-bounds? (first q) (second q) h w))
       (map (lambda (d) (list (+ (first p) (first d)) (+ (second p) (second d)))) ds)))
   (define (has-core? o)
     (for/or ([p (obj-cells o)])
       (and (member (list (+ (first p) 1) (second p)) (obj-cells o))
            (member (list (first p) (+ (second p) 1)) (obj-cells o))
            (member (list (+ (first p) 1) (+ (second p) 1)) (obj-cells o)))))
   (define blues (filter (lambda (o) (= (obj-color o) 1)) (objects g -1)))
   (define blacks (filter (lambda (o) (= (obj-color o) 0)) (objects g -1)))
   (define stray
     (remove-duplicates (append
       (apply append (map obj-cells (filter (lambda (o) (not (has-core? o))) blues)))
       (filter (lambda (p)
          (<= (count-if (lambda (q) (= (at g (first q) (second q)) 1)) (adj p cardinal-deltas)) 1))
          (find-color g 1)))))
   (define holes
     (remove-duplicates (append
       (apply append (map obj-cells (filter (lambda (o) (not (has-core? o))) blacks)))
       (filter (lambda (p)
          (let* ([ns (adj p cardinal-deltas)]
                 [n (count-if (lambda (q) (= (at g (first q) (second q)) 1)) ns)])
            (or (>= n 3) (= n (length ns))))) (find-color g 0)))))
   (define clean (recolor-cells g stray 0))
   (define (outline ps)
     (filter (lambda (p) (not (member p holes)))
       (remove-duplicates (apply append (map (lambda (p) (adj p all-8-deltas)) ps)))))
   (define rims (outline holes))
   (define painted (recolor-cells clean rims 7))
   painted)))

Provenance

Generator
generators/public_eval_71e489b6/generator.py
Notes and decisions
generators/public_eval_71e489b6/notes.md
Review label
reviewed_safe
Generator SHA-256
cf0964fb86c166a343e929b7bf5bd1fd19cb8859521f8c68364b78a355d28c9a
Rule hash
a39a8442f82e
Sources
evaluation, public_eval:71e489b6
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_71e489b6 --count 1 --seed 20261108 --test 1