← all repositories
zepen/predict_Lottery_ticket

Predicting Chinese lottery numbers with sequence models

It scrapes Chinese lottery history and trains sequence models to predict upcoming 双色球 or 大乐透 draws.

1k stars Python Domain AppsML Frameworks
predict_Lottery_ticket
Velocity · 7d
+0.7
★ / day
Trend
steady
star history

What it does This project scrapes historical winning numbers for China’s 双色球 and 大乐透 lotteries from 500.com, then trains separate deep-learning models to predict upcoming draws. Red balls are handled as a sequence prediction task, while blue balls are modeled separately, with results available via command-line scripts or a web interface. Model hyperparameters and train-test splits live in config.py.

The interesting bit The author ditched independent-ball assumptions in favor of a sequence model with a CRF layer, mainly to eliminate duplicate red-ball predictions. The catch: the CRF implementation required disabling TensorFlow 2 eager execution and falling back to tf.compat.v1 APIs, a compromise the README notes openly.

Key highlights

  • Supports both 双色球 (ssq) and 大乐透 (dlt) via a runtime flag
  • Uses a sequence model with CRF layer to avoid duplicate red-ball predictions
  • Web UI at ai-spinach.xyz for training and prediction without local setup
  • Auto-scrapes historical draw data from the 500.com lottery site
  • Configurable model hyperparameters and train/test split ratios in config.py

Caveats

  • Data ingestion depends on scraping 500.com, so site changes or blocks break the pipeline
  • TensorFlow runs in 1.x compatibility mode inside TF 2.x, which is technical debt
  • The README documents evaluation features but cites no accuracy metrics or performance baselines

Verdict Developers curious about applying CRFs to short tabular sequences, or Chinese lottery players who want an algorithmic number picker, might enjoy tinkering. Anyone seeking a proven statistical advantage—or who does not play these specific lotteries—can safely skip it.

Frequently asked

What is zepen/predict_Lottery_ticket?
It scrapes Chinese lottery history and trains sequence models to predict upcoming 双色球 or 大乐透 draws.
Is predict_Lottery_ticket open source?
Yes — zepen/predict_Lottery_ticket is an open-source project tracked on heatdrop.
What language is predict_Lottery_ticket written in?
zepen/predict_Lottery_ticket is primarily written in Python.
How popular is predict_Lottery_ticket?
zepen/predict_Lottery_ticket has 1k stars on GitHub and is currently holding steady.
Where can I find predict_Lottery_ticket?
zepen/predict_Lottery_ticket is on GitHub at https://github.com/zepen/predict_Lottery_ticket.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.