Next up, pick 3 permutation counter.

Published:

Going to create a counter for permutations of the pick 3 combos.

It stands to reason that the combo that won the most times straight is not necessarily the one with the most appearances boxed as well.

This one will count all of the combos for straight hits, but then also for hits on any permutations. Of course the triples will be kept out, so that is going to count the rest of the possible combos, all 900 from 001 to 998.

This time I am aiming to generate a report rather than just save to a csv file for further processing. (Though that will also be done).

Output format will be sorted by historic winnings...

NNN.   # straight hits.   # permutation hits (boxed)   $calculated winnings based on history

There are libraries in Python that make dealing with permutations orders of magnitude easier than the long and complex spreadsheet formulas.

Why all the extra work? Because this process gets a great deal more difficult when scaling up to the pick 5! 

Pick 3, 3 unique digits has 1 combo with 5 additional permutations... pick 5, 5 unique digits has 1 combo with 119 additional permutations!

Plus, leaving out the 5 of a kind combos, there remain 99,990 combos to sift through.

Same work flow as prior attempts, perfect the design on the pick 3 then just scale up...

Should be relatively easy, right?

Entry #342

Comments

Avatar lakerben -
#1
Are you going to post the  program.
Avatar hypersoniq -
#2
Perhaps once it works, yes. It will be much easier to discuss when there is code available.
Avatar hypersoniq -
#3
So this first working version is just about ready, however the best tools for the job involve including sone libraries that need to be imported, namely Pandas for the data frame and itertools for the functional permutation tools. The prototype prints directly to a .csv file and shows everything in order of the combos, so the output starts at 000 and goes through 999. At the validation stage now, where I have to pick up a specific 3 digit combo and hand count it and the permutations to make sure the results are accurate for both 3 unique digit numbers with 5 additional permutations, one pair, with 2 additional permutations, and triples with zero additional permutations.
I have yet to work on the overall count logic where it adds up the straight and box hits, but it is ouputting the count results and they look reasonable.
Avatar hypersoniq -
#4
Validation with the pick 5 version will be an absolute nightmare as a pick 5 number with 5 unique digits has 119 additional permutations.

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