Development: a random enough lottery picking script

Published:

I wonder how that would look in Python and what functions would need to be written..

For the white balls in a jackpot game like Mega Millions, it is as easy as 

population = range(1, 71)

k = 5

unique_random_numbers = random.sample(population, k)

print("unique_random_numbers")

Where population is the range of possible numbers and k is the number of balls you want to pick. 

But this would be a bit different for a pick 3 game, and for a pick 5 game...

It might be better to create a function and call it 3  or 5 different times (emulating a mechanical draw)

Then there is the question of how random is random enough? 

Built in PRNG of Python?

Using the entropy stack from the local Operating System? Caveat is if the stack gets depleted, it defaults back to PRNG...

Remote API call(s) to an external source such as random.org?

So the plan is to create this script, but replace the population "range" with a list of numbers that were classified as neutral from my last script. In this way I can try adding some randomness to the phase 2 selection process.

For example, cutting the hots and colds from the last script, this leaves 5 to 7 neutrals in each position. So it would basically generate a home brew quick pick using the subset of all possible balls that classified as neutral in the previous step.

I don't think this will take too long to write, but it is the details that are important. My current pick 3 selections (769 mid day and 045 eve) have their last draws on Thursday. I should be able to try a custom QP for the next week.

The entire Cash 4 Life test is 100% funded with house money, as will be the next 2 weeks of the pick 3. It was nice to get a shot at playing for free. Hope it happens again sometime soon.

Entry #455

Comments

This Blog entry currently has no comments.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register