← public_eval_8b9c3697 · public_eval_8f215267 →

public_eval_8e5c0c38

Infer each color silhouette's best vertical mirror axis and remove unmatched pixels.

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!
 ;; Each foreground color is a possibly disconnected silhouette. Background is
 ;; the most frequent color (smallest color on ties). For each silhouette infer
 ;; the vertical axis retaining the most same-color mirror pairs. Count axis
 ;; cells once; take the leftmost doubled axis on ties. Erase unsupported pixels.
 (lambda (g)
  (let ()
   (define colors (grid-colors g))
   (define background
    (for/fold ((best (first colors))) ((color (in-list colors)))
     (if (> (count-color g color) (count-color g best)) color best)))
   (define (axis-for cells)
    (define lo (min-of second cells))
    (define hi (max-of second cells))
    (define scored
     (for/fold ((best (list -1 (* 2 lo)))) ((k (in-range (* 2 lo) (+ 1 (* 2 hi)))))
      (let ((score (count-if (lambda (p) (member (list (first p) (- k (second p))) cells)) cells)))
       (if (> score (first best)) (list score k) best))))
    (second scored))
   (for/fold ((out g)) ((color (in-list (grid-colors g background))))
    (let* ((cells (find-color g color)) (axis (axis-for cells)))
     (for/fold ((acc out)) ((p (in-list cells)))
      (if (member (list (first p) (- axis (second p))) cells)
          acc
          (set-cell acc (first p) (second p) background))))))))

Provenance

Generator
generators/public_eval_8e5c0c38/generator.py
Notes and decisions
generators/public_eval_8e5c0c38/notes.md
Review label
reviewed_safe
Generator SHA-256
9576e3b34a5ae3954d5a2957e0871962cc68efbcfcc43003106d1cdb8ea9164d
Rule hash
bf5e6d3dcfc8
Sources
evaluation, public_eval:8e5c0c38
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_8e5c0c38 --count 1 --seed 20261108 --test 1