尚未检测到更新。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.