← public_eval_65b59efc · public_eval_6e453dd6 →

public_eval_67e490f4

No summary in the catalog.

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!
 ;; Identify the large connected TEMPLATE, then classify its background holes
 ;; by shape up to all rotations/reflections. Count external GLYPHS of each
 ;; matching shape by color. Fill each hole with its most frequent matching
 ;; color; numeric minimum resolves exact vote ties. Preserve the template.
 (lambda (g)
  (let ()
   (define least-frequent? #f)
   (define background (mode g -1))
   (define objs (objects-8 g background))
   (define template (pick-max objs obj-size))
   (define bb (obj-bbox template))
   (define template-color (obj-color template))
   (define crop (apply subgrid g bb))
   (define holes (objects crop template-color))
   (define (in-template? p)
    (and (<= (first bb) (first p) (third bb)) (<= (second bb) (second p) (fourth bb))))
   (define glyphs (filter (lambda (o) (not (ormap in-template? (obj-cells o)))) objs))
   (define (matches? a b)
    (member (sort (normalize-cells (obj-cells a)) cell<) (all-transforms (obj-cells b))))
   (for/fold ((out crop)) ((hole (in-list holes)))
    (define matching (filter (lambda (o) (matches? hole o)) glyphs))
    (define palette (unique (map obj-color matching)))
    (define counts (map (lambda (color) (count-if (lambda (o) (= (obj-color o) color)) matching)) palette))
    (if (null? palette) out
     (let* ((best (apply (if least-frequent? min max) counts))
            (chosen (apply min (for/list ((color (in-list palette)) (n (in-list counts)) #:when (= n best)) color))))
      (recolor-cells out (obj-cells hole) chosen)))))))

Provenance

Generator
generators/public_eval_67e490f4/generator.py
Notes and decisions
generators/public_eval_67e490f4/notes.md
Review label
reviewed_safe
Generator SHA-256
444b6eea4fb1b9a3757ff1fbcd7ac20d1b2ba702086f19f6b3909fd2cb264bae
Rule hash
5593f4ad397b
Sources
evaluation, public_eval:67e490f4
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_67e490f4 --count 1 --seed 20261108 --test 1