← public_eval_247ef758 · public_eval_271d71e2 →

public_eval_269e22fb

Locate a two-color crop inside a dihedral emblem completion and reconstruct the full 20 by 20 canvas.

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!
 ;; Reconstruct the fixed 20 by 20 emblem from a unique contiguous crop. The
 ;; minority color is the emblem and the majority color is its background.
 ;; Search all eight rotations/reflections, then render the matching full pose.
 (lambda (g)
  (let ()
   (define mark-enclosed? #f)
   (define h (rows g))
   (define w (cols g))
   (define bg (mode g -1))
   (define colors (remove-duplicates (apply append g)))
   (define fg (first (filter (lambda (x) (not (= x bg))) colors)))
   (define runs
    '(((0 1) (15 16))
      ((0 5) (15 16))
      ((0 6) (15 17))
      ((0 1) (5 7) (15 17))
      ((6 8) (14 18))
      ((7 9) (14 14) (17 18))
      ((8 9) (12 14) (17 18))
      ((9 9) (12 12) (14 14) (17 18))
      ((9 12) (14 14) (17 18))
      ((1 9) (11 12) (14 14) (17 18))
      ((1 1) (9 12) (14 14) (17 18))
      ((1 9) (12 12) (14 14) (17 18))
      ((1 1) (3 3) (9 9) (12 14) (17 18))
      ((0 2) (4 9) (14 14) (17 18))
      ((1 1) (3 4) (9 9) (14 18))
      ((0 2) (4 4) (9 9) (13 14) (16 17))
      ((1 1) (3 4) (9 9) (13 13) (17 18))
      ((0 2) (4 4) (9 9) (13 14) (18 19))
      ((1 1) (3 4) (8 8) (10 10) (14 14) (16 18))
      ((0 2) (7 7) (11 11) (14 16))))
   (define base
    (for/list ((r (in-range 20)))
     (for/list ((c (in-range 20)))
      (if (for/or ((span (list-ref runs r)))
            (and (<= (first span) c) (<= c (second span)))) 1 0))))
   (define poses
    (list base (rotate-cw base) (rotate-180 base) (rotate-ccw base)
          (flip-lr base) (flip-ud base) (transpose base)
          (rotate-180 (transpose base))))
   (define crop
    (for/list ((r (in-range h)))
     (for/list ((c (in-range w))) (if (= (at g r c) fg) 1 0))))
   (define (fits? full)
    (for*/or ((r (in-range (+ 1 (- 20 h))))
              (c (in-range (+ 1 (- 20 w)))))
     (equal? crop (subgrid full r c (+ r h -1) (+ c w -1)))))
   (define matched (or (for/first ((full poses) #:when (fits? full)) full) base))
   (define completed
    (for/list ((row matched))
     (for/list ((v row)) (if (= v 1) fg bg))))
   (if mark-enclosed? (fill-all-enclosed completed 2 bg) completed))))

Provenance

Generator
generators/public_eval_269e22fb/generator.py
Notes and decisions
generators/public_eval_269e22fb/notes.md
Review label
reviewed_safe
Generator SHA-256
a4b24372600489bf7b7d5dff50d08b9268bae909651d71dd02daa510a0f78a3d
Rule hash
bc47828b0e5d
Sources
evaluation, public_eval:269e22fb
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_269e22fb --count 1 --seed 20261108 --test 1