尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Small puzzle games with a bit of maths behind them, deployed together as one Vercel project.
puzzle/index.html: the overview page, served at the root (romke.com). puzzle/stats.html is the
private stats page for all games, served at /stats (needs the STATS_TOKEN), one tab per game.mouse/: Schrödinger's Mouse. A mouse hides in a ring of holes and moves to a neighbouring hole
every night. Each day you open two holes. How quickly can you be sure to catch it?
index.html is the whole game, maths.html the explainer, DESIGN.md the design notes,
solve.py the brute-force par solver,
plus the manifest, service worker and icons that make it installable and offline.
Also served at mouse.romke.com (a host rewrite in vercel.json maps that domain onto /mouse/).square/: Square Peg. Every loop hides a square (Toeplitz' inscribed square problem). A loop a
day, find its squares; or draw your own loop in the Lab. index.html is the page, peg.js the
solver and loop generator shared with gen.js, which stocks puzzles.json with a loop per day
(node square/gen.js 400 tops the stock up to 400 days; existing days are never changed).
DESIGN.md has the theorem and the design, solve.py a Python prototype of the solver.pi/: Where π hides. Twelve small experiments where π turns up: a rolling wheel, Archimedes'
polygons, squares filling a circle, darts, Buffon's needle, Galperin's bouncing blocks, coprime
pairs, the Basel sum, the Leibniz series, the Mandelbrot neck, a pendulum and a guitar string. index.html is the whole page.
Counters: a start per page view (level p0) and a replay the first time a tile is animated
(level p1..p12, the tile's number).e/: Where e hides. The same idea for e: Euler's method climb, the factorial series, area 1 under
1/x, a ball in the valley of x^(1/x), random pours until overflow, the hat check, letters into
mailboxes, the 45° spiral, the base whose curve is its own slope, the geometric mean of 1..n
(Stirling), Euclid's squares in an e × 1 rectangle, and the 37% rule. index.html is the whole page.
Same counters, with levels e0 (page view) and e1..e12.api/: four small Vercel functions shared by the games: likes, feedback, gameplay counters,
stats. They take a game field (mouse by default, square, pi or e); the mouse keeps its original
Redis keys, other games get a :game suffix. lib/kv.js talks to the Redis store.vercel.json: the rewrites. mouse.romke.com/* → /mouse/* (except /api/), and / → /puzzle/.All pages reference their own files relatively, so each game works at its folder and, for the mouse, at the root of its own domain.
Games only (no likes, feedback or counters, no host rewrites):
python3 -m http.server 8000 # then open /mouse/ or /square/
Everything, including the API functions, against an in-memory fake store:
node scripts/fakekv.js & # Upstash-compatible fake Redis on port 8799
vercel dev --listen 127.0.0.1:3000
with a .env file (ignored by git) containing:
KV_REST_API_URL=http://127.0.0.1:8799
KV_REST_API_TOKEN=local
STATS_TOKEN=localtest
Domains: romke.com (the overview and every game under its folder) and mouse.romke.com
(the mouse at the root, via the host rewrite). Adding a game needs no DNS: a new folder, a card on
the overview page, and api/event.js and lib/kv.js told about its name.
Storage: Upstash for Redis from the Vercel Marketplace, connected to the project. It sets
KV_REST_API_URL and KV_REST_API_TOKEN. Without them the API answers 503 and the game still works.
STATS_TOKEN: any long secret; it unlocks /stats.
Web Analytics: enable it in the project's Analytics tab. The page only loads the script on
*.romke.com and *.vercel.app.
The game is a playable version of the classic "13 Caves and a Thief" brain teaser, a puzzle widely reported as a Google interview question: a thief hides in one of thirteen caves arranged in a circle and moves to a neighbouring cave every night; two police officers can search two caves a day. How many days until they are sure to catch him? The idea came from the reel "Can You Solve This Google Puzzle?" by @piratecodeofficial on Instagram. Write-ups of the original: AfterAcademy, CrazyForCode.
Toeplitz' conjecture (1911): every simple closed curve contains four points that form a square.
Open in general, proven for every curve you can draw. See square/DESIGN.md for references.