zepen/predict_Lottery_ticket
zepen/predict_Lottery_ticket has 1,076 GitHub stars and 461 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-09 11:18 UTC. Last push 2026-09-10.
AI彩票号码预测
Measured star growth
- in 24h
- +1
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalAI Lottery Number Prediction

简体中文 | English
Online Training & Prediction: https://www.ai-spinach.xyz
Customer Service: Group 1246714623, Group 2980203303
📖 Introduction
This is a deep learning-based lottery number prediction experiment. For entertainment purposes only. Please do not use it for any illegal purposes or excessive betting.
The core of this project is the predictive power of sequence models. Unlike traditional approaches that treat each number independently, this project models the red balls as a complete sequence and introduces a CRF (Conditional Random Field) layer to capture sequential dependencies between numbers. This effectively avoids duplicate numbers caused by independent prediction and improves the coherence and rationality of the results. The blue ball is predicted by a separate model.
The entire model is built in TensorFlow 1.x compatibility mode and runs under TensorFlow 2.x via the tf.compat.v1 interface.
✨ Features
- Supports Double Color Ball (SSQ), Super Lotto (DLT), Seven Happy (QLC), and Seven Star (QXC)
- Provides an online training & prediction web app, no local deployment required
- Uses an LSTM + CRF sequence model to improve red ball prediction coherence
- Supports model evaluation with adjustable train/test split
- Pure script-based execution, no Docker or microservices needed
🛠️ Installation
- Install Anaconda (see tutorial)
- Create a conda environment:
conda create -n your_env_name python=3.11 - Activate the environment and install dependencies:
conda activate your_env_name pip install -r requirements.txt
🚀 Getting Started
Fetch Training Data
python get_data.py --name ssq # Double Color BallIf parsing fails, check whether http://datachart.500.com/ssq/history/newinc/history.php is accessible.
Other lottery types:
name args Super Lotto --name dltSeven Happy --name qlcSeven Star --name qxcTrain Models
python run_train_model.py --name ssqThe red ball model is trained first, followed by the blue ball model. Model parameters and hyperparameters are configured in config.py. Training time depends on the parameters.
Predict Numbers
python run_predict.py --name ssqPrediction results will be printed to the console.
📝 Update Log
Added support for Seven Happy and Seven Star (parameters qlc, qxc)
Switched crawler to curl_cffi due to anti-bot measures; Python 3.11 is now required
Launched a web app for online training and prediction without downloading the source code
Added model evaluation with adjustable train/test split (training ratio > 0.5 recommended)
Fixed the issue of blue ball prediction exceeding the valid range in Super Lotto
Fixed data dimension mismatch caused by parameter passing during training
Added full support for Super Lotto (data crawling, training, prediction) via --name dlt
Removed Docker and microservices to lower the entry barrier; just run the scripts
Updated library versions in requirements.txt to resolve most dependency issues
Changed the red ball model to treat all red balls as a single sequence (LSTM + CRF) instead of independent predictions, avoiding duplicate numbers. Since the CRF layer API requires tf.compat.v1.disable_eager_execution(), the entire model is built and trained in 1.x mode.
Explore related projects
tensorflow/tensorflow
An Open Source Machine Learning Framework for Everyone
201,427 starshuggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
168,711 starsAUTOMATIC1111/stable-diffusion-webui
Stable Diffusion web UI
165,261 starsComfy-Org/ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
145,835 stars