Underground 2 Revived
Play Need for Speed: Underground 2 (2004) in Chrome and Firefox with WebGPU graphics, Web Audio, up to 120 fps widescreen, controller support, free roam and Online races with friends. Fan project, not
翻譯準備中
Hookah Pookah poker calculator with exact enumeration and honest Monte Carlo error bars. Hold'em, Short Deck, PLO4 and PLO5 equities, weighted ranges, hand chances and every next card, all in your bro
翻譯準備中
遊戲TypeScript · CSSGitHub @KarthikSubramanian07上線中營運者未確認
試用過了嗎? 點一下就好,不需要登入。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Exact-enumeration and Monte Carlo poker odds engine for Hold'em, Short Deck and PLO: equities, ranges, hand-type chances and next-card outs, all in your browser.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
What are the chances? Poker odds that tell you exactly, or tell you exactly how sure they are.
Hookah Pookah is a poker equity calculator for Texas Hold'em, Short Deck (Triton and classic rules), PLO4 and PLO5. Give it hands, partial hands, random hands or weighted ranges, a board and dead cards, and it answers:檢視完整 README ↗What are the chances? Poker odds that tell you exactly, or tell you exactly how sure they are.
poker · equity-calculator · texas-holdem · short-deck · omaha · monte-carlo · web-worker · cloudflare-pages
Hookah Pookah is a poker equity calculator for Texas Hold'em, Short Deck (Triton and classic rules), PLO4 and PLO5. Give it hands, partial hands, random hands or weighted ranges, a board and dead cards, and it answers:
It is exact whenever the math allows. Heads-up preflop enumerates all 1,712,304 boards in about 35 ms. Range against range runs exactly in around 100 ms. When a spot is too big (say, five random opponents preflop), it switches to Monte Carlo on every CPU core and keeps sampling until the 95% confidence interval is as tight as you asked for. That interval is always on screen, and the result never shows more digits than it can defend.
Everything runs in your browser. No server, no account, no ads.
| Route | Game |
|---|---|
/holdem | Texas Hold'em |
/short-deck | Short Deck, Triton or classic rules |
/plo | Pot Limit Omaha (4 cards) |
/plo5 | 5 Card Omaha |
Spots live in the URL, so every calculation is shareable:
/holdem?p=AhKh&p=r:QQ+,AKs&b=Qh7h2c
The answer updates as you go: your chance to win, whether you are a favourite or an underdog, what hand you are likely to finish with, and (once there is a flop) which next cards help you. Open Should I call? to compare the price of a call with your chances.
Switch on Advanced for opponent ranges, the 13x13 range grid, dead cards, precision settings and the full hand table. Shared links that use those features open in Advanced automatically.
AhKh vs QQ+, AKs vs random on Ks7h2d dead 2ca h. Backspace clears it.| Notation | Meaning |
|---|---|
AA AKs AKo AK | a hand class (AK is suited and offsuit) |
QQ+ ATs+ KTo+ | pairs upward, or kickers up to one below the top card |
22-55 A2s-A5s K9o-KJo | pair ladders and shared top card ladders |
T9s-54s | constant gap ladders |
AhKh | one exact combo |
15% 10%-25% | top hands by preflop all-in equity (vs 3 random hands by default, vs 1 selectable) |
random any | every combo |
AA:0.5 KK:25% [50]AQs, AJs[/50] | weights |
When a combo appears twice, the later token wins, so QQ+, AA:0.5 means what it says.
Accuracy is the whole product, so it is checked against independent implementations rather than against itself.
| Check | Result |
|---|---|
| All 133,784,560 seven-card hands, category counts | exact match to the published table; 4,824 distinct ranks |
| Short deck seven-card counts, Triton and classic | exact match to an independent C enumerator; 762 and 752 ranks |
| PokerHandEvaluator test corpus: 5, 6, 7 card, PLO4, PLO5 (6.6M hands) | 0 inconsistencies, 0 ordering violations |
| Heads-up and 3-way preflop equities vs OMPEval exhaustive enumeration | identical to 4 decimals |
| 35 random range vs range matchups vs OMPEval | max difference 5e-7 percentage points |
| Randomised spots (ranges, weights, partial hands, dead cards, all variants) vs a naive brute-force oracle | identical to 1e-14 |
| Monte Carlo 95% intervals over thousands of seeded runs | cover the exact answer 94.8% to 95.6% of the time |
A finding worth passing on: short deck equities quoted around the web (AsAh vs KsKh at 75.02%) use classic rules. Under Triton rules, where trips beat a straight, it is 74.96%. Hookah Pookah supports both and says which one it is using.
The unit suite runs these oracles on every push; pnpm test:stress runs the exhaustive and long-running versions (weekly in CI).
src/
engine/ pure TypeScript, no DOM: runs in Node, Vitest and Web Workers
cards.ts card ids (rank * 4 + suit), parsing, formatting
evaluator.ts suit-mask evaluator and rule tables (standard, short deck Triton, classic)
omp.ts OMPEval-style rank-key perfect hash, filled from evaluator.ts
omaha.ts direct two-plus-three Omaha evaluation, no subset loop
scorer.ts showdown scorer used by every hot loop
boardIso.ts exact board enumeration with irrelevant-suit merging
equity.ts planning, exact enumeration, Monte Carlo, range breakdowns, next card
ranges.ts range grammar, percent orderings, formatting
rng.ts xoshiro128** with unbiased integer draws
worker/ worker entry, message protocol, pool with sharded Monte Carlo
state/ spot model, URL codec, quick spot parser, SEO titles
ui/ React components and hand-written CSS
scripts/ orderings, perfect hash offsets, OG image, post-build SEO, stress suite
tests/ Vitest suites and the naive reference oracle
e2e/ Playwright against the production build on the Pages runtime
Evaluation. Cards fold into four 13-bit suit masks. Pairs, trips and quads fall out of XOR and AND across the masks, and straights and flushes come from 8192-entry tables, the idea popularised by pokersource's poker-eval. That evaluator defines the truth. For speed, omp.ts builds an OMPEval style perfect hash (additive rank keys plus a flush table) whose values are copied from the mask evaluator, so both always agree, including under short deck reordering. Omaha uses a case analysis after Open PQL that never loops over the 60 or 100 two-plus-three subsets.
Exact enumeration. Range players are expanded into their conflict-free joint assignments. Random hole cards are enumerated per player, then boards are dealt with irrelevant-suit merging: a suit nobody can flush in collapses same-rank cards into one weighted branch. Joint deals that are suit relabelings of each other are enumerated once and replayed from a cache. Together these make exact mode the common case.
Monte Carlo. Range assignments are sampled either from the enumerated joint list (weighted, O(log n)) or by rejection of whole assignments, never player by player, which would be biased. Hole cards and boards come from a partial Fisher-Yates shuffle. Each worker runs an independent seeded shard in short slices; the pool merges raw sums (weights, equity, squared equity, categories) so the combined standard error is exact, and stops every shard cooperatively once the target is reached.
Planning. Before running, the engine estimates the work: joint deals after suit caching, times runouts, times players. Below the budget it enumerates; above it samples.
Requires Node 22.18+ (TypeScript runs natively) and pnpm.
pnpm install
pnpm dev # http://localhost:5173
pnpm test # unit and oracle suites
pnpm test:e2e # Playwright on the built site (runs wrangler pages dev)
pnpm test:stress # exhaustive counts, PHEvaluator corpus, long fuzz, calibration
pnpm lint && pnpm typecheck
pnpm build # dist/ with route pages, sitemap and headers
Generators (outputs are committed):
node scripts/gen-preflop-ranking.ts # percent orderings: exact vs 1 random, 20M trials vs 3
node scripts/gen-omp-offsets.ts # perfect hash offsets
node scripts/gen-og.ts # social card and icons, with live engine numbers
Zero touch. The site is static and lives on Cloudflare Pages as project hookah-pookah, connected to this repository.
main is green, the deploy job calls the project's Pages deploy hook (secret CLOUDFLARE_DEPLOY_HOOK), waits until hookah-pookah.pages.dev serves the exact bundle CI built, and smoke tests every route.Manual deploys still work with pnpm deploy (wrangler direct upload).
Standing on the shoulders of OMPEval (ISC), PokerHandEvaluator (Apache-2.0), Open PQL (MIT), PokerStove (BSD-3) and pokersource's poker-eval (read, not copied).
MIT © Karthik Subramanian