From the event: Mindstone Bristol October AI MeetupBeating the Lotto, with AI
View event

Beating the Lotto, with AI

Thank you, Adrian. Adrian, would you mind just standing there?

A Historical Lesson in Lottery Thinking

I'd like you to picture the scene. The year is 1757. We're in the Seven Years' War against France, as is often the case. And in the south of England, I believe it's Southampton, could be Portsmouth,

there's a firing squad lined up to shoot, unfortunately, not Adrian this time, No, no, only kidding. But Admiral Bing. Anybody know who Admiral Bing was? You, sir? He was indeed the last admiral to be shot by the Royal Navy.

Do you know why? Cowardice in the face of the enemy. And that's how we lost Menorca and the Port of Mahon, which is the biggest natural port in that part of the Mediterranean Sea.

And that's why if you go to Menorca, they still say in the local dialect of Catalan that these things are not called fenestres as they say in the rest of Catalonia but windows and that's also why you get Menorcan gin.

Now why do I mention this? Well one of the chaps who was present on that quarter deck was a Frenchman in exile as you can imagine and he was there to watch this and wrote about it afterwards because he was a prolific writer he talked about social commentaries got into loads of trouble for it anybody know who that was it was indeed voltaire now how did how did voltaire happen to have

have all of the time in the world, yes, there was a pun there, to write as much as he did? How was he able to write some really, really edgy stuff and not get into too much trouble? Anyone know? AI. I don't believe it was AI, but it was money, lots and lots of money.

Voltaire and a friend of his who happened to have some money before realized that the lottery system that the French government were running when he was a youngster wasn't quite right. If you knew how to game the system and bought lots of tickets you could actually win more money than you'd have to spend.

So that's what they did and it set him up for life so much so that he never actually really worked he just did what he fancied doing after that which which was, as it so happens, write a lot.

Using AI to Rethink the Lottery

And what I'm going to, I guess, talk about today isn't so much how you can become the next Voltaire, but good luck if you do, but actually how we can use AI to rethink our approach to the lottery.

Now, you're not going to win the lottery with AI normally, but there are some ways in which you can improve your odds and this is really an exercise on how to use AI in that thinking process that Andrew rightly was describing earlier and how to get us into the habit of it.

The lottery example is just that an example but it has got some interesting ramifications.

Equal Odds, Unequal Payouts

So your numbers matter but not in the way perhaps that you think they do. We can't change the odds.

We have over 40 million ways in which we can lose our money, sorry, in which we can pick numbers. Every combination that we pick has exactly the same odds of winning, whether it's 1, 2, 3, 4, 5, 6, 1, 15, 26 and so on. But not every combination that you pick could win the same amount

amount of money so if we start off with a simple question like this you know pick me some random numbers for the next lottery draw this is I would imagine where you'd say level one or even level zero in your AI learning process you can do this it will spit out some numbers and you know if you'd like to see this in action it's simple as that of course I can't remember the exact prompt so bear with me.

This is a great use of AI, isn't it? And lo and behold, there you go. Yep, every combination has the same number of odds.

Now, actually, this bit here isn't what you would normally get. You can tell that it's actually been learning from some of my previous discussions. And I'll come back to that in a moment.

So it's given me, as you can see, six random numbers. Hurrah.

Why Popular Number Choices Matter

The problem is, though, people don't pick numbers in a completely random way. We are creatures of habit. We're informed by our past, our memories, our society, and we're really, really, really bad at being random.

So what happens is that when you analyse the last 10 years' worth of research in the numbers that are being picked and the numbers that win and so forth, that some are underpicked, some are overpicked. Interestingly, birthdays, anniversaries, kids' ages come up a lot.

So the first 12 months, or the first 12 digits, are commonly represented on the majority of tickets that are being currently bought. So if you choose those numbers, you're going to run into problems.

Oh, for instance, if I chose 1, 2, 3, 4, 5, 6, if you recall from what I said earlier, exactly the same odds of winning with that number as any other number combination, but around 10 ,000 other people do play 1, 2, 3, 4, 5, 6 every week. So when I win, I'm going to be splitting that first prize with 10 ,000 other people. I'm not going to make that much money from it. So it's within my interest to find numbers that don't work so well.

Finding Contrarian Number Patterns

So using this as a concept, I started discussing this with Claude, as it so happens. And we realised very quickly that, yes, the months were an issue. Days would be an issue as well, for a similar reason. And then we also started discussing other variations.

variations and rather interestingly AI came up with the concept of lucky numbers. It could be eight if you're in China, lucky seven in the UK seems to be quite a common one. 13 is considered to be unlucky so fewer people pick it but we're also creatures of habit and we tend to do numbers

that either go down the middle or we pick the corners and these numbers come up surprisingly often as well, some more than others. But nonetheless, you end up very quickly with a bias map like this.

This last half of the numbers are the contrarian zone. This is where fewer people pick the numbers. And so the opportunity for clashing with another person that's picked that number decreases. And hopefully it gets you to the point where you're not actually conflicting with somebody else.

Testing the Hypothesis with Draw Data

Well what I then did to actually analyze this a little bit further is I put the CSV of you know quite a few over a thousand lottery draws over a 10 -year period from 2016 to 2025 to actually understand the variations a little bit more and actually test whether these hypotheses that we were working out actually worked.

I'm conscious of time and I'm probably a little bit tight so I won't go through that process but do have a play with it all of this is publicly available data and you can play with it at your own convenience but what you end

up with is a chart like this notice that it's not fewer wins but fewer people win when the draw looks contrarian and you can see very quickly that the number of people that you'd have to start sharing that prize with has decreased tremendously.

So again the odds of you winning remain the same but the odds of you winning a larger sum of money have increased and this is the result of doing precisely this.

A Repeatable AI Research Process

Going back to what Andy was saying earlier actually using the research that had undertaken with AI to verify its assumptions and my assumptions in the process and then lastly creating documentary evidence to support it and we do this every day with AI we just don't necessarily formalize it in this way we start off with the initial thought of

of give me a number or set of numbers then we stop and we think about what we really actually want and then we start to analyze it and we go through the back and forth in the conversations as Andy was suggesting and very quickly we then get to the answer that's closer to what we need we perhaps verify it for accuracy and then usually we document it in some way and although this was just messing

around looking at the odds with six numbers for the lottery picking I thought it was an interesting example of how the AI skills are used in a number of different disciplines because the

Key Takeaways

process is pretty much the same across all of those so if you want the top tips here they are by all means take a photograph or ask me later

but I hope you've enjoyed this very brief conversation gamble responsibly

if you have any interest in discussing this further please connect to me with LinkedIn

AI Security and Governance

but what I'm really here for is to talk about AI security and governance as I do that every single day it makes for a really boring slideshow

but I hope that I've kept you interested in something slightly different, and if you want to talk about AI security or governance, see me afterwards.

Thank you.

Finished reading?