← public_eval_64efde09 · public_eval_67e490f4 →

public_eval_65b59efc

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!
 ;; The gray table has square top templates, middle layout fragments and
 ;; bottom recoloring swatches. Overlay the middle fragments; each nonzero
 ;; layout cell selects its source-color template, recolored by that template's
 ;; bottom legend. Default stamps as drawn; the alternative rotates each tile.
 (lambda (g)
  (let ()
   (define n (for/first ((c (in-range w)) #:when (= (at g 0 c) 5)) c))
   (define starts
    (filter (lambda (x)
     (for*/or ((r (in-range n)) (c (in-range n)))
      (and (not (= (at g r (+ x c)) 0)) (not (= (at g r (+ x c)) 5)))))
     (range 0 (+ (- w n) 1) (+ n 1))))
   (define templates
    (for/list ((x starts))
     (let* ((source (for*/first ((r (in-range n)) (c (in-range n))
                       #:when (not (= (at g r (+ x c)) 0))) (at g r (+ x c))))
            (target (for*/first ((r (in-range (+ (* 2 n) 2) h)) (c (in-range n))
                       #:when (and (not (= (at g r (+ x c)) 0))
                                   (not (= (at g r (+ x c)) 5)))) (at g r (+ x c))))
            (offsets (for*/list ((r (in-range n)) (c (in-range n))
                         #:when (= (at g r (+ x c)) source)) (list r c))))
       (list source target offsets))))
   (define layout
    (build-grid n n (r c)
     (let ((v (for/first ((x starts) #:when (not (= (at g (+ n 1 r) (+ x c)) 0)))
                (at g (+ n 1 r) (+ x c))))) (if v v 0))))
   (for*/fold ((out (build-grid (* n n) (* n n) (r c) 0)))
               ((r (in-range n)) (c (in-range n)) #:when (not (= (at layout r c) 0)))
    (let* ((entry (for/first ((t templates) #:when (= (first t) (at layout r c))) t))
           (offsets (third entry)))
     (for/fold ((result out)) ((p offsets))
      (let ((rr (first p)) (cc (second p)))
       (set-cell result (+ (* r n) rr) (+ (* c n) cc) (second entry)))))))))

Provenance

Generator
generators/public_eval_65b59efc/generator.py
Notes and decisions
generators/public_eval_65b59efc/notes.md
Review label
reviewed_safe
Generator SHA-256
314734db81d96f47643a2fc0bbbfe3d25d032914052bb44d1acaece92af9a7de
Rule hash
401c174b6c48
Sources
evaluation, public_eval:65b59efc
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_65b59efc --count 1 --seed 20261108 --test 1