About Engine & Precomputed Firestore Database
Learn how pokerhands.page calculates expected ranks, probability distributions, and strategy optimization for 5-card draw poker.
⚡ Firestore Precomputed Tables & Architecture
pokerhands.page is built on Cloud Run using Quart and Jinja2. It features a complete analytical engine backed by precomputed tables in Google Cloud Firestore:
- 5-Card Complete Hand Rankings: All 2,598,960 possible 5-card hands mapped to 7,462 distinct rank strength levels (Rank 1 = Royal Flushes).
- Partial Hand Tables (4, 3, and 2 Cards): Precomputed distribution tables calculating expected rank values, min/max bounds, and win probabilities across all remaining deck draws.
- Strategy Optimization Engine: Evaluates all legal redraw decisions in 5-Card Draw (holding 5 cards or redrawing 1, 2, or 3 cards) to select the play that minimizes expected rank number and maximizes win probability against 3 opponents.
- Vertex AI Gemini NLP Interface: Integrates Google Cloud's Vertex AI Gemini model to allow users to ask natural language questions about poker math, hand distributions, and strategies.