You're unable to read via this Friend Link since it's expired. Learn more

Member-only story

I Had AI Play The Lottery So You Don’t Have To Waste Your Money

Jan Kammerath
9 min readMar 16, 2025

It’s everyone’s dream: have AI play the lottery and win so that we all can focus on what really matters: learning yet another programming language. There’s a ton of information out there on how you can use AI, machine learning or LLMs to play the lottery. Some of them are simple, others include complex mathematical and statistical approaches. But does it really work and can AI get you rich? I don’t know and that’s why I took it to the test using Google Colab, Gemini 2.0 Flash, Grok 3, ChatGPT 4o and Claude 3.7 Sonnet.

My Google Colab notebook that is supposed to make me rich

I invested a precious €14.90 (equivalent of $16.27) into the Saturday drawing of the classic lottery 6 of 49 (German: “Lotto 6 aus 49”). It’s the most popular game where players select 6 numbers from a pool of 49, and a bonus number chosen from 0 to 9. Drawings occur twice weekly, and the jackpot is won by matching all 6 main numbers plus the bonus, with additional prize tiers for fewer matches.

tl;dr While my 12 lottery tickets matched 5 of the drawn numbers, none of them were matched on a single ticket, so I just spent €14.90 and did not win anything at all. Neither the statistical analyses with Google Colab nor Grok 3, Gemini 2.0 Flash, ChatGPT 4o or Claude 3.7 Sonnet won anything.

My 12 lottery tickets and the drawn numbers

Let’s see the number crunching in detail and how we got there. I’ll also draw some, quite obvious, conclusions from the different approaches and why lottery is gambling that has very little to do with number crunching. Before we dive in, an important information upfront.

Do you feel that you may have developed a problem with gambling? Help is available through the Hotline of NPC Gambling (U.S.), Landesstellen Glücksspielsucht (Germany) or the respective support in your country. Asking for help is never a shame or weakness, but shows the strength that you identified a problem and are willing to get help. Please do not hesitate to seek out help if you think you may have developed a gambling problem.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Jan Kammerath
Jan Kammerath

Written by Jan Kammerath

I love technology, programming, computers, mobile devices and the world of tomorrow. Check out kammerath.com and follow me on github.com/jankammerath

Responses (1)

Write a response