← 54a83e6bbc20 · 552c2402dce3 →

54b040e4bd08

Fill a 6..10 by 9..12 grid with a distinct-color 2x2, 2x3, or 3x2 periodic tile, erase one solid interior row- or column-band, then recover the smallest global two-dimensional period and restore every zero cell.

2D periodicityhole repairtile inference

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).

Reference rule (Racket)

(rule! (let ((dummy 0)) (define (same-residue-values grid th tw rr cc) (filter values (for*/list ((r (in-range (rows grid))) (c (in-range (cols grid)))) (let ((v (at grid r c))) (if (and (not (= v 0)) (= (modulo r th) rr) (= (modulo c tw) cc)) v #f))))) (define (tile-dims-valid? grid th tw) (all? (lambda (rc) (let* ((rr (first rc)) (cc (second rc)) (vals (same-residue-values grid th tw rr cc))) (and (not (empty? vals)) (all? (lambda (v) (= v (first vals))) vals)))) (for*/list ((r (in-range th)) (c (in-range tw))) (list r c)))) (define (infer-tile grid) (let* ((cands (filter (lambda (dims) (tile-dims-valid? grid (first dims) (second dims))) (for*/list ((th (in-range 1 (+ (min 5 (rows grid)) 1))) (tw (in-range 1 (+ (min 5 (cols grid)) 1)))) (list th tw)))) (dims (first cands)) (th (first dims)) (tw (second dims))) (for/list ((r (in-range th))) (for/list ((c (in-range tw))) (first (same-residue-values grid th tw r c)))))) (let ((tile (infer-tile g))) (grid-from-fn (rows g) (cols g) (lambda (r c) (let ((v (at g r c))) (if (= v 0) (at tile (modulo r (rows tile)) (modulo c (cols tile))) v)))))))

Provenance

Generator
generators/54b040e4bd08/generator.py
Notes and decisions
generators/54b040e4bd08/notes.md
Review label
reviewed_safe
Generator SHA-256
cda17d37aca36d09fee0d424e3d959f19048f7c5f65e15637fc4d73fd20a835f
Rule hash
55b239af8777
Sources
bank:02cfd661bb19
Lesson seeds
20261108, 20261109, 20261110, 20261111, 20261112
Reproduce lesson 1
arcpuzzles generate 54b040e4bd08 --count 1 --seed 20261108 --test 1