hypersoniq's Blog

Busy coding day

Starting off with running the next "on the house" pick 3 combos and then going to play them.

The harder part is for fine tuning the Cash 4 Life classifier, as a deeper dive into the data shows too many draws that should be classified as cold are being given the Neutral classification.

The standard deviation ends up being too wide when using 1.5 as a scalar, this is most likely because it was set for 1 to 60, but the observed range is much tighter. Good thing I created the script with a scalar variable already in place!

It will be simply stepping back from 1.5 to 1.45 and moving down until the cold numbers go back to being cold. The lists are too big for each column. Even though the use of the set eliminates duplicates across lists, a number picked twice in 534 draws is cold by any definition...

This is not a burning priority, but I have the time today AND I am aware of the issue... so may as well fix it now.

The other thing is dropping in $7 a la carte to play a gut feeling on the PA pick 4... for a box play on 1177. I know that the last appearance of any of the 6 permutations the most recent appearance in the day game was 7/24/2021 and the last appearance in the evening was 2/9/2017, but gotta go with the "hunch" because I rarely have them. There was to be a surplus of $13 after playing the pick 3 for a few more weeks on them, so it will come from that... still no out of pocket expenses this month. Only playing box as the combo has only ever been drawn 14 times since it first appeared on the evening game back in 1983. $400 for a $0.50 box is good enough IF it shows up.

On Saturday the last 6 draws of the first attempt at the Cash 4 Life will be purchased. Not impressed with those results so far, but the next time house money becomes available, that will be the test of it's all neutral QP generator.

I may also factor in a revised odds calculator for the Cash 4 Life based on the number of entries in the neutral combined set just out of curiosity. As an example, if just 5 numbers are eliminated, the odds for the neutral white ball numbers drop from 1 in 7,282,016 down to 1 in 4,638,348. If 10 balls are eliminated, it drops to 1 in 2,825,013. Still a ton of combos, but then the QP generator will choose just 1 of those resultant combos.

It is kind of like the difference between a slot machine and video poker... both still favor the house, and both require some degree of luck, but at least you feel there was SOME attempt on your part to influence the outcome on a video poker machine instead of just letting the slot machine take your money.

Entry #463

Big win random considerations

Been awhile since I looked into what to do if there might ever be a big win.

Some things have stayed the same... top federal tax rate on a lottery win is 37%, but the IRS only requires your state lottery to withhold 24%. That means you will owe an additional 13%, but not on all winnings as the sliding tax rate applies until you hit that 37% THIS is a big reason they recommend a tax attorney to help with planning. You don't have what you think you have until the taxes are paid! Estimated tax payment is probably the best way to keep the success in a winner's story.

Pennsylvania also collects 3.07%, non sliding. Not sure if they withhold that before cutting the check or if you owe it later, like you do on a win over $600.01

CDARS, the system that allows you to hold a large amount in your bank account and have FDIC insurance on all of it still exists, only it now goes by the IntraFI Network.

No anonymous claims in PA, they still want to add to the chaos by painting a target on your back. Still first name, last initial, county of residence and amount won. This one always boggled the mind... the cash 5 is hit almost every night and I have lived in this state all 56 years of my life and NEVER met a winner, nor do I know anyone who has...

It is not looking good for needing to use any of the above info for this first run of the Cash 4 Life test (9 draws remain of 26), but it does only have to work once...

I still have yet to perfect the pick 3, so I will probably run out of time without a big win, but at least I can say I gave it my best shot and stayed within or under (periods of just not playing at all) budget while doing so. Of nothing else, I have proven to myself by constant exploration of ideas and rigorous back testing that random numbers can not be predicted, and learned a great deal about programming and statistics along the way. Still not throwing in the towel, but I DO have a realistic outlook... this will probably never work, but I will continue to try anyway because it is one of the cheapest hobbies I have.

Never hurts to dream a little though.

Entry #462

Making the Cash 4 Life QP generator even easier to use

Because the classifier runs individually on 5 columns, the easiest way to combine them AND eliminate duplicates is to use the properties of a Pyrhon set to concatenate them, then catch the result as a list to copy and paste into the QP Generator

list_A = [<numbers from list A>]

...

list_E = [<numbers from list E>]

neutrals = list(set(list_A + list_B + list_C + list_D + list_E))

print(neutrals)

Tested without updating the draws and it works exactly as imagined. There are other ways to do this, but the built in properties of the Python set make it the most efficient.

Entry #461

2 more $2 hits on the Cash 4 Life

So that brings the total won to $10

The net loss is now -$198

The second 10 draw ticket ends on Friday 8/8

The last ticket will be for 6 draws and will run from 8/9 to 8/14

So there are 12 more chances on the combo.

If the pick 3 hits again, the next C4L test will be using the custom all neutral QP generator. I can see where bias with regard to the gap stats probably made this not the best combo. QP will remove that bias. I will be writing a neutral export function for the Cash 4 Life classifier that will output only neutrals to a csv file to make the list easier to create. It is one big list of neutrals from 1 to 60 used to take 5 random samples. I may also just generate the list right in the program to make it even easier to copy it into the QP generator.

Entry #460

First week of pick 3 using the all neutral QP generator

Ran it exactly once after updating the draw histories. There are less than 20 lines of code, and some are comments left for forgetful future me...

Only 8 lines longer for the pick 5 version which is not going to see use without a pick 3 win.

The Cash 4 Life version is under 10 lines!

Easy pick, as yet to be determined effectiveness.

One observation while testing the C4L version, random.sample(population,5) presents the QP in descending order.

15 draws left on the current C4L attempt, and enough left over to cruise through august on the pick 3 house money.

I am NOT sold on distilling the neutral numbers through a QP, but I am temporarily out of new ideas for interpreting the data, so for now it will have to do. Maybe there is some luck to be had... time will tell.

Entry #459

All neutral QP scripts done

The script is simple, it has a function called machine() that can be called to return a random pick from a supplied list.

So the main section has a list of the neutrals for each position (random example numbers)

Group_A = [ 2, 3, 4, 7, 8, 9, 0]

Group_B = [1, 2, 4, 6, 7, 9, 0]

Group_C = [4, 5, 6, 8, 9]

Then they are called to store the pick in a variable

PickA = machine(Group_A)

PickB= machine(Group_B)

PickC = machine(Group_C)

print(f"Mid Day all neutral QP is {PickA} {PickB} {PickC}")

 

So, one script does both day and night for the pick 3, another does the pick 5 and yet another does Cash 4 Life, though that one is slightly different as it uses random.sample(5) in it's machine to emulate a non replacement draw.

There was no need to back test as it is a QP generator, just ran it in a loop to ensure it was only picking numbers from each list.

So that is where I am... Phase one classifies the drawn numbers based on frequency, hots and colds are dropped as outliers, and a random QP is generated from the all neutral sets. So far trying to make decisions based on the output has not worked too well, let's see if this new approach to phase 2 makes it any better... zero bias from me introduced in this new phase 2.

Maybe it is a step back from "best guess" to "guess", but I am confident in the concept of phase 1, as there still remains an 85% chance of an all neutral pick happening in a 7 draw window for the pick 3 (day or night) and a 52% chance of the same in pick 5. I am still working on a back test script to test the same for Cash 4 Life, though that has a bigger window. So far random spot back tests are showing at least 1 or 2 all neutral draws in EVERY 26 draw window...

It is interesting that this observation holds the same occurrence rate for both day and evening games, as PA uses computer draws for day and machine draws for night.

Tomorrow will start a new week for the Pick 3 live test and will be the first attempt using the all neutral QP generator. I will have to wait for another P3 straight hit to get another shot at Cash 4 Life or the Pick 5, my operating rule for this crazy system is to ONLY use house money on those games.

It was nice that after 5 weeks my out of pocket expenses were recovered and the next couple of weeks of pick 3 tests are also courtesy of the PA lottery. MANY tests of different systems never got off the ground from a budget standpoint. Some never got played at all.

So I think I have checked the boxes...

Analysis portion of draw frequency

Number elimination based on statistics

Dumb luck element of a QP

Now all I need to do is hit again...

Entry #458

First 10 of 26 Cash 4 Life drawings completed

Round 1 Cost... $80 for 10 draws

Wins... 3 1+1 @ $2 each

Net Loss... technically free because the entire test is on the house, but... -$74

Round 2 of 10 draws with the same combo starts tomorrow evening. That cost will also be $80

Final round will only have 6 plays, therefore $48.

The brute forcing of playing one combo with all 4 cash balls is what makes the expense, but on a hit it will definitely be all worth it.

So, total cost $208... wins thus far $6... current "state" is -$202

But remember, the only way I can take a shot at this is with a straight hit on the pick 3, so out of pocket cost is $0, plus I made back the money spent in the first few weeks of the pick 3 system... and a few bucks profit... and the next few weeks of pick 3 are also on the house. I shouldn't need to throw any money at the pick 3 out of pocket until late August. A box hit could keep that going longer... and a straight hit opens up another round of Cash 4 Life.

Next round for the pick 3 will employ the new QP generator I wrote that selects a random pick only using the neutral numbers from each column to generate a combo. It was definitely easy to write AND test with a loop to see if the picks were indeed constrained to the 3 separate neutral sets... they were. Also wrote a version for the Cash 4 Life should there be another round of that.

It is a best guess based on the tools at hand. The pick 3 neutral sets cut the choices from 1,000 possible combos down to about 300... the QP just makes selecting from the resultant sets easier. I do not know where else to turn to interpret the results any further... yet. The QP generator should buy some time for new ideas while still staying in the chase.

Entry #457

Continuing with a Python QP generator

The code is simple enough. The goal is to make a guess on the neutral sets without introducing bias on my part. I am no further along on interpreting the output, so, since it is a guess anyway, why not let Python do it?

As I have seen in the past, when treating a non replacement jackpot game as isolated columns, it will look at what is available for each column, and the final pick may be out of sorted order, which is an easy fix for play... That was any system applied to the Match 6.

I will make it a stand alone script that I will need to input the neutrals from. One for each game. (Recycling the P3 and P5 versions for day and night). The interesting one will be the Cash 4 Life.

Overall it will be less of a definite pick based on the frequency statistics and more of an "educated" guess... at least until I can find a better way to interpret the results.

Entry #456

Development: a random enough lottery picking script

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

An idea, add some randomness to the selection process...

So, my phase 1 classifies the chosen amount of draw history into Hot, Neutral and Cold. The resultant neutral numbers still make too big of a set of combos to cover... so what about making a draw simulator that only loads the balls picked as neutral in phase one?

That would give a break to the confusing second step of trying to decipher all of the output... still picking just one combo from the neutral set, which still contains hundreds, tens of thousands or even millions of combos depending on the game analyzed...

Something to think about...

Entry #454

After 3 days of 0 white balls on the Cash 4 Life...

Got one number... because all 4 cash balls were played, that is $2... putting the 10 draw test so far at -$78

It was the only prize without 3 other prizes, but a win is a win right?

Since the test is for 26 draws the overall value is -$206

BUT

It was house money, so technically even the $2 win is profit. 6 draws to go on this ticket, 22 to go on the test.

Entry #453

Cycle adjustment for the Cash 4 Life

Now that I know advanced draws are limited to 10, I may just shorten the window to 20 draws rather than 26. I will play the full 26 this round, but there are still one or more NNNNN draws when shortening to 20. Also lowers the cost to $160 on any combo rather than the $208 it is now.

Also, rather than go on about how many drawings in a row it is possible to get 0 white balls (2 so far) I will limit to mentioning any wins... for this and the dailies.

I have 24 more draws to think about how the selection process might change, but only 3 draws to test something new on the pick 3. Pick 5 is going to be out again until another pick 3 hits. Same with the C4L after this run.

Sticking to the budget as per usual...

Entry #452

Cash 4 Life tickets bought... not as expected...

You can tell I never did anything previously with this game. Power Ball, Mega Millions and PA Match 6 all allow 26 advanced plays... Cash 4 Life only allows 10.

No change to the plan, just have to play the same combo 2 more times... again for 10 draws and finishing up with 6 draws. I will obviously resist looking at the data until after 26 draws have passed.

10 plays on a $2 ticket is $20, so to cover all cash balls (1-4) cost $80. The next 10 will be $80 more, with the last 6 being $48. The same $208 that 26 advanced draws cost, just broken into 3 plays.

An upside is that any smaller wins can fund subsequent rounds.

Will also have to harvest wins that approach $100 to minimize claim forms if a 4 ball match happens (one claim form for $2,500, plus 3 @ $500... claim form triggered @ $600 and above.).

There is no prize just for having the cash ball, but the prizes would be based on having all cash balls played.

1+1 = $2, max one per draw

2+1 = $10 + 3x $4 = $22

3+1 = $100 + 3x $25 = $175

4+1 = $2,500 + 3x $500 = $4,000

5+1 = $7 Million + 3x $1 Million

 

Then there is the 9pm un-televised drawing...

Everything on my side is done, now the rest is up to the Lottery... again...

Entry #451

Cash 4 Life was one difficult combo selection.

I had not planned on a ticket for 26 draws since when I tried it with the PA Match 6 (many missed, but won just enough to cover the cost of the ticket).

The plan I mentioned earlier about using a simple grid to gray out numbers after selecting one was surprisingly useful.

I worked from the extreme low pick and extreme high pick and worked towards the middle. I let the neutral data be the guide, but kept in mind the average gaps of the 5/60 being slightly above 10.

I typed the method used for post draw analysis and refinement, just like the current pick 3 and pick 5 tests.

Got the pick and the funds, just need to go play tomorrow.

Entry #450

Coin flip for a fill week ends up catching a hit!

Since I had not made a selection as I am still rewriting and testing code, but I was in the middle of a test, I will sometimes just pick a number to play. The routine (which is rarely used) is to take a quarter and flip it... heads = play 777 for a week and tails = play 666 for a week. Years ago it brought in one hit on 666.

So I played from last Saturday through yesterday. It was heads, so 777 was played and on Thursday night it hit! Since there is no box play on triples, went for the $1 straight and took $500!

Months of preparation and 3 weeks of a no win test only to win on a dumb luck coin flip...

What it boils down to... the first 3 weeks of the test were basically refunded... this week I have picks for pick 3 and pick 5 and the kicker... once I make a pick, I will have a shot at the Cash 4 Life... one 5 digit combo played across 26 draws using all 4 "cash balls"... a $208 cost... all on the state! Not to mention the rest of the win  is straight up profit.

First draw on the pick3 and pick5 test was yesterday (almost a box on the day pick 3 and 2 of 5 in position on the night pick 5), still figuring out how to interpret the data for the Cash 4 Life, so that won't probably start until next week.

It is stupid dumb luck like that which keeps motivation up. Each week methods are revised on the test. So the system has yet to create a win, but the secondary goal of having the state pay for the tests has been met. 6 draws remain on the 4 games (3 mid and eve, 5 mid and eve) AND I am free and clear to take a shot at the Cash4Life. 

It does make one wonder about why go through all the effort outside of keeping up with coding skills when it is ultimately dumb luck or coincidence that brings in the rare hits, yet I am quite motivated to continue research on house money!

Entry #449