MCPcopy Create free account
hub / github.com/RianKoja/lottery_numbers

github.com/RianKoja/lottery_numbers @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
32 symbols 64 edges 5 files 15 documented · 47% updated 20mo ago★ 50

Browse by type

Functions 30 Types & classes 2
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Get Lottery Numbers

This repository provides a method to optimally choose lottery games by:

  1. 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.

  2. 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.

Setup

  1. Adjust the variables in config.toml.
  2. Recommended: set your own seed for the random number generator. This helps ensure that you won’t be playing the exact same games as someone else using this repository.
  3. The initial set of games (games) can be set with your lucky or favorite game sets.

Running

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.

Testing

Run tests locally:

cargo test

Or run tests in a Docker container:

bash test.sh

Contributing

Pull requests are welcome. Feel free to fork this repository and submit your changes.

May the odds be ever in your favor.

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 24
Method 6
Class 2

Languages

Rust100%

Modules by API surface

src/custom_utils.rs18 symbols
src/data_structures.rs10 symbols
src/config.rs3 symbols
src/main.rs1 symbols

For agents

$ claude mcp add lottery_numbers \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page