This repository provides a method to optimally choose lottery games by:
Ensuring no two games share three numbers in common
This means that if a partial prize is awarded by matching three or more numbers, the likelihood of winning a partial prize is optimized.
Ensuring no numbers below a given threshold are contained in these games
A suggested threshold is 32, since many people pick "birthday" or "favorite" numbers that rarely go higher than 20. Excluding lower numbers helps minimize the chance of sharing any potential prize with those who pick common low numbers.
config.toml. games) can be set with your lucky or favorite game sets.To generate your set of lottery games, run:
cargo run
This will produce optimized_games.csv.
For a quick correctness check (written in Python), run:
python test_set.py
Both steps (Rust and Python) can also be executed in Docker by running:
bash run.sh
A file named optimized_games.csv will be created on the root folder.
Run tests locally:
cargo test
Or run tests in a Docker container:
bash test.sh
Pull requests are welcome. Feel free to fork this repository and submit your changes.
May the odds be ever in your favor.
$ claude mcp add lottery_numbers \
-- python -m otcore.mcp_server <graph>