← public_eval_b9e38dc0 · public_eval_c4d067a0 →

public_eval_bf45cf4b

Identify stencil and multicolor tile, then form their background-aware block product.

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 monochrome object is a stencil; the multicolor object is a tile.
 ;; Infer the background by frequency and segment all foreground with 8-neighbors.
 ;; Crop both roles tightly. An occupied stencil cell expands into one unchanged
 ;; tile, and an empty stencil cell expands into an equally sized background block.
 ;; The alternate family restricts the stencil to its largest 4-connected region,
 ;; breaking ties by reading order without shrinking the original stencil box.
 (lambda (g)
  (let ()
   (define selection "all")
   (define rival "")
   (define bg (mode g -1))
   (define groups (objects-multicolor g bg))
   (define (mono? o)
    (= (length (remove-duplicates
      (map (lambda (p) (at g (first p) (second p))) (obj-cells o)))) 1))
   (define mo (first (filter mono? groups)))
   (define to (first (filter (lambda (o) (not (mono? o))) groups)))
   (define mask (subgrid g (obj-r1 mo) (obj-c1 mo) (obj-r2 mo) (obj-c2 mo)))
   (define source-tile (subgrid g (obj-r1 to) (obj-c1 to) (obj-r2 to) (obj-c2 to)))
   (define regions (objects mask bg))
   (define effective (if (equal? rival "other_setting")
     (if (equal? selection "all") "largest" "all") selection))
   (define raw-active
    (cond
     [(equal? rival "first_component") (obj-cells (first regions))]
     [(equal? rival "last_component") (obj-cells (last regions))]
     [(equal? rival "smallest_component") (obj-cells (pick-min regions obj-size))]
     [(equal? effective "largest") (obj-cells (pick-max regions obj-size))]
     [else (filter (lambda (p) (not (= (at mask (first p) (second p)) bg))) (grid-positions mask))]))
   (define active
    (cond
     [(equal? rival "fill_stencil_box") (grid-positions mask)]
     [(equal? rival "flip_stencil")
      (map (lambda (p) (list (first p) (- (cols mask) 1 (second p)))) raw-active)]
     [else raw-active]))
   (define tile
    (cond
     [(equal? rival "transpose_tile") (transpose source-tile)]
     [(equal? rival "flip_tile") (flip-lr source-tile)]
     [(equal? rival "flat_tile")
      (empty-grid (rows source-tile) (cols source-tile) (first (grid-colors source-tile bg)))]
     [else source-tile]))
   (for/list ([r (in-range (* (rows mask) (rows tile)))])
    (for/list ([c (in-range (* (cols mask) (cols tile)))])
     (if (member (list (quotient r (rows tile)) (quotient c (cols tile))) active)
      (at tile (modulo r (rows tile)) (modulo c (cols tile))) bg))))))

Provenance

Generator
generators/public_eval_bf45cf4b/generator.py
Notes and decisions
generators/public_eval_bf45cf4b/notes.md
Review label
reviewed_safe
Generator SHA-256
949fbd0275d79e960d4490b6e27196beddc3ea508667dc3ca0e9cdc08ccba360
Rule hash
e60b5ce1a2e2
Sources
evaluation, public_eval:bf45cf4b
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate public_eval_bf45cf4b --count 1 --seed 20261108 --test 1