This project provides a sophisticated lottery number generation system that creates unique combinations based on historical data and specific constraints. It also includes a prize checking system to verify how well the generated combinations perform against winning numbers.
- Smart Number Generation: Creates unique lottery combinations based on historical frequency data
- Configurable Parameters: Customize various aspects of number generation
- Prize Checking: Verify how well generated combinations perform against winning numbers
- Detailed Analysis: Provides comprehensive statistics about matches and potential prizes
- Python 3.6 or higher
- Required packages (install using
pip install -r requirements.txt):- pandas
- numpy
- matplotlib (optional, for visualization)
- Clone this repository:
git clone <repository-url>
cd KinoChallenge- Install required packages:
pip install -r requirements.txtBasic usage:
python lottery_generator.pyWith custom parameters:
python lottery_generator.py --num_combinations 100 --max_consecutive 4 --output_file my_combinations.txtAvailable parameters:
--num_combinations: Number of combinations to generate (default: 400)--numbers_per_combination: Numbers per combination (default: 10)--min_number: Minimum number in range (default: 1)--max_number: Maximum number in range (default: 80)--max_consecutive: Maximum consecutive numbers allowed (default: 3)--history_file: Path to historical data file (default: lottery_history.csv)--output_file: Path to save generated combinations (default: generated_combinations.txt)
Basic usage:
python check_prize.py --combination "1 2 3 4 5 6 7 8 9 10"With custom parameters:
python check_prize.py --combination "1 2 3 4 5 6 7 8 9 10" --predictions_file my_combinations.txt --output_file results.txtAvailable parameters:
--combination: Winning numbers to check against (required)--predictions_file: File containing generated combinations (default: generated_combinations.txt)--output_file: File to save results (default: results.txt)
The combinations are saved in the following format:
Combination:Numbers
Combination 1:[1,2,3,4,5,6,7,8,9,10]
Combination 2:[11,12,13,14,15,16,17,18,19,20]
...
The results include:
- Total number of combinations checked
- Number of winning combinations
- Total prize amount
- Match distribution statistics
- Detailed match information for each combination
The prize structure is based on the number of matches: 10: 25000000, # 10 matches 9: 150000, # 9 matches 8: 10000, # 8 matches 7: 1000, # 7 matches 6: 300, # 6 matches 5: 60, # 5 matches 0: 0 # 0 matches
- Generate combinations:
python lottery_generator.py --num_combinations 100 --max_consecutive 4- Check against winning numbers:
python check_prize.py --combination "1 30 31 33 44 58 59 63 67 73"Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details.