A Python/PyQt6 desktop app to fetch, analyze, and study Kentucky Powerball data.
Version 2.5.3. These tools are for analysis and entertainment. Nothing here predicts lottery numbers or improves your odds — every 5+1 combination has the same probability, 1 in 292,201,338. Where the app produces numbers, they are labeled as best historical fit, not predictions.
- Data — fetch recent draws from the Kentucky Lottery API, or load the full modern-era history (~1,600 draws since the Oct 2015 matrix change) directly from NY State Open Data (the same national Powerball numbers). A readout shows the current draw count and date range at a glance.
- Analysis — frequency, gap/overdue, positional, and pair analysis.
- Pick Numbers — weighted number generation and a "Draw & Rank" tool that scores random tickets against historical patterns.
- Predictability — a forensic/educational tab that cracks a known pseudo-random generator (LCG) to prove the method works, then runs the same cracker on real draws and shows plainly that it fails. The null result is the point: real draws carry no recoverable generator.
- Best Candidate Search — a time-boxed, cancellable research search over many
model families, encodings, and ensembles. It uses a chronological
train/validation/holdout split (the holdout is scored exactly once), ranks by
held-out log-loss versus the random baseline, and always returns the strongest
candidate found — with an honest verdict and an underpowered-data warning.
Reports save to
Documents/Lottery Analyzer/reports.
- Python 3.10+
PyQt6,selenium(seerequirements.txt)- Microsoft Edge WebDriver (only needed for the live KY scrape fallback; the NY Open Data history fetch and all analysis need no browser)
pip install -r requirements.txt
python LotteryApp.py
The core algorithms run headlessly:
python LotteryApp.py --selftest # 8 checks in LotteryApp.py
python selftest_search.py # 10 checks for the search backend
Locally: run build.bat (installs deps, runs the self-test, then PyInstaller).
Output: dist/LotteryAnalyzerPro.exe.
On GitHub (automatic): push a version tag and the included workflow
(.github/workflows/build.yml) builds the exe on windows-latest and attaches
it to the matching release:
git tag v2.5.3
git push origin v2.5.3
| File | Purpose |
|---|---|
LotteryApp.py |
GUI, data fetching, DB, all tabs |
scoring.py |
log-loss scoring rules + random baselines |
validation.py |
chronological split + held-out evaluation |
historical_models.py |
non-PRNG candidate models + ensemble |
prng_tests.py |
LCG / LFSR solvers + PRNG search candidates |
candidate_search.py |
the time-boxed evolutionary search |
report_builder.py |
plain-English report + honesty guards |
selftest_search.py |
backend self-tests |
The honest, expected result of the Best Candidate Search on real draws is "best candidate found, but no reliable predictive signal." That is not a bug — it is the correct finding for a fair lottery. Read the verdict, not the hope.