Commit Graph

21 Commits

Author SHA1 Message Date
2c7cd67ab7 fix streak signal, reweight predictions, and reorder UI
- Fix streak signal: was giving 100% to streak chair after normalization
  (non-streak chairs were 0), now properly distributes probability with
  streak chair getting less as streak grows (actual mean reversion)
- Change recent window from 20 to 50 games
- Reweight signals based on backtest: base_rate 0.15→0.20 (best performer),
  recent 0.10→0.15, streak 0.10→0.05, balance 0.15→0.10
- Move Live Market Sentiment above Signal Breakdown
2026-02-26 10:36:53 +05:00
9762c0f9bf add bet impact simulator, visitor log page, and fix console logging
- Bet impact simulator on /predictions shows rank headroom and safe bet amounts
- Password-protected /visitors page with visitor log table and stats
- Console now logs real visitor IPs instead of Cloudflare tunnel IPs
2026-02-26 10:19:14 +05:00
86865166ef add balance/mean-reversion signal and Cloudflare visitor logging
Balance signal (15% weight) favors under-represented chairs over last 50
games. Visitor middleware captures real IPs from CF headers, batched into
ClickHouse with 90-day TTL.
2026-02-26 09:59:27 +05:00
5fd4894599 add whale/public semi-win scoring, expand to last 50, and full history modal
- Whale/public picks now track 2nd pick and score SEMI (0.5 pts) like model
- Prediction table expanded from 20 to 50 rows
- "View All History" modal with pagination (50/page), fetches up to 500
- Accuracy rows use semi-win scoring for all three columns
2026-02-26 09:51:08 +05:00
d1dc8f62fa add whale/public picks to prediction history and new API endpoint
- Add _compute_whale_public_picks() to reconstruct whale/public picks from historical bets
- Merge whale_pick, public_pick, whale_hit, public_hit into last_20_predictions
- Add get_prediction_history(limit) for lightweight prediction+accuracy data
- Add /api/prediction-history endpoint (default 100, max 500)
- Add Whale and Public columns with HIT/MISS to Last 20 table in frontend
2026-02-26 09:42:16 +05:00
54501260b4 add bettor count trend to public trend panel 2026-02-26 09:29:34 +05:00
e84145905f fix bet recommendations to show actual coin amounts on fav and 2nd pick 2026-02-26 00:09:21 +05:00
949d0c2a57 add semi-win scoring (0.5 pts for 2nd pick) and whale/public bet recommendations 2026-02-26 00:03:59 +05:00
1eed8786db add seat recommendations, bet advisor, and live whale/public trends
Prediction hero now shows ranked TOP PICK and 2ND PICK with EV per unit
bet (P(win)*2.9 - 1). Bet Size Advisor panel shows Kelly criterion
fraction (capped 25%), best chair with confidence, and historical bet
rank insight (how often lowest/highest-bet chair wins).

Live Market Sentiment section tracks whale trend (top 5 bettors by amount)
and public trend (total pool distribution) in real-time via WebSocket,
mirroring the live dashboard. Notes highlight agreement/divergence between
model pick and crowd favorite.

Historical crowd analysis cards show how often the most-bet, mid-bet, and
least-bet chairs actually won across all games.

Round result flash now includes whale/public pick accuracy alongside the
model prediction result. user_bet WebSocket events are tracked to build
per-round bettor profiles for whale analysis.
2026-02-25 23:41:40 +05:00
4903b6943a add real-time game data, prediction history, and fix winning cards chart
- WebSocket connection shows live game state (round #, phase, bets per
  chair, pot) in a persistent bar at the top of predictions page
- Prediction cards now display current bet amounts per chair
- Round results flash HIT/MISS against the Bayesian prediction
- New "Last 20 Predictions vs Actual" table with per-game probabilities,
  predicted vs actual winner, and running accuracy
- Predictions auto-refresh after each round ends
- Fix winning cards chart: use taller container (480px) and dedicated
  scales config for horizontal bar rendering
- Add _last_n_predictions() helper to db.py for detailed per-game
  prediction history with game numbers
2026-02-25 23:25:49 +05:00
b07b073cc0 add predictions page with game theory analysis and card stats
Bayesian next-chair predictor (Markov chains, base rate, streak regression),
statistical tests (chi-squared, runs test, autocorrelation), theory
backtesting with rolling accuracy, and card-level analysis (value/suit
distribution, face card frequency, top winning cards).
2026-02-25 23:16:37 +05:00
d8ec792a88 fix UNION ALL ORDER BY using positional references for ClickHouse 2026-02-25 22:56:53 +05:00
2b8e3dd456 add pattern analysis feature with web dashboard and CLI
New /patterns page with 9 analyses: chair win bias, bet rank
correlations, hand type distributions, pot size buckets, streaks,
hourly patterns, and recent-vs-overall comparison. Also adds a
standalone analyze.py CLI script for terminal output.
2026-02-25 22:45:43 +05:00
e65b6b2cfb fix reversed A/C chair mapping and update hot/cold on round end
CHAIRS mapping was {1:A, 2:B, 3:C} but the API's country field has
1=C and 3=A. Fixed the mapping in backend and both frontends, added a
startup migration to swap A↔C columns in existing DB data, corrected
multiIf SQL queries that hardcoded the wrong winner→column mapping,
and moved _save_round() to the ENDED status block so hot/cold stats
reflect the latest round immediately.
2026-02-25 20:49:16 +05:00
3016f33783 mobile support fixes 2026-02-22 20:43:31 +05:00
9239fd7a05 mobile support 2026-02-22 20:41:47 +05:00
46ffb3b61d mobile support 2026-02-22 20:36:02 +05:00
root
3eba3d77bc fixes 2026-02-22 15:18:46 +00:00
root
8220987611 fixes 2026-02-22 15:04:51 +00:00
0ed4142d78 fixes 2026-02-21 18:19:56 +00:00
85f44e6a22 Initial commit: Teen Patti live monitor with analytics
Live dashboard with real-time WebSocket updates, analytics page with
time-filtered stats, ClickHouse storage, and Caddy reverse proxy.
2026-02-21 22:36:40 +05:00