hypersoniq's Blog

So far, the story remains the same

There was hope starting a new pick 3 system.

There was a straight hit to fund some experiments on other games (pick 5 and Cash 4 Life)

There were more losses than wins, but as of this moment the system has cost 0 out of pocket because of the 1 win.

There are 2 more "free" weeks to play.

Constant re evaluation of the system leads to some major changes...

1. Implementing the inter quartile range instead of 1 standard deviation on either side of the expectancy to classify draws... that was a major change with minimal coding because I was already looking at the quartiles.

2. Implementing the recency as a tie breaker. I should have that done and tested in the next 2 hours.

3. The planned implementation of the chi-square goodness of fit test for the draws that make up the 150 row model... that will take a bit longer.

4. Preparing to turn the results into inputs for a Markov Decision Process by using back testing and reinforcement learning to automate the selection process.

I will eventually implement these changes and will most likely find myself disappointed with the results, then it will be another phase of sitting on the bench until I come up with another "big" idea.

I do believe that this is the last system for the year. Planned and pondered for months. 

The pick 3 is just as difficult as any game when gunning for one combo... True odds... 1:1,000 every time. I have had my "coincidental" hit that most systems produce in the first few weeks, so now it's time to see if there is more to it. I am comfortable with the budget for the remainder of 2025... there are 20 more weeks and 2 are on the house, so 18 x $14 = $252. Because I am doing 50 cents straight and 50 cents boxed, only one win will keep the project on the state... which means I will need a second win to have another shot at the pick 5/ Cash 4 Life combo.

Entry #478

No hit on the pa pick 3 mid, last draw for evening.

Not looking good for the all neutral QP generator.

The new addition of the recency metric should help put together another pick without having to resort to the RNG script.

Gave it a few tries and it was not meant to be.

Of course, they could still draw 749 tonight...

I am still liking the play for a week process.

Entry #477

Planning the phase 1 changes.

When adding functionality to an existing script, the best practice is to add, debug and test each new feature on it's own.

Since my script is modular and responds to the number of columns imported from the csv history file, the function will be modified to add each feature, starting with the most recent appearance of each digit in the distribution. Using pure frequency, there are frequent ties that were in need of a way of being broken.

The second pass will print the P value of the chi-square goodness of fit test for the 150 draws in the current run.

So using version control, the main code will be branched to implement each change and only rolled back into the main code when working. This way I always maintain a WORKING copy to roll back to in the event of errors.

Phase 2 will be a clean sheet implementation, therefore will take much longer to plan and code.

No shortage of work in this hobby!

Entry #476

Talking shop with Google's Gemini...

Going over some statistical conversations with Google's Gemini the past few days. I like certain aspects better than Chat GPT, such as it references it's sources for further exploration.

What resulted is I am planning to add some new data to the output of the classifier script...

1. A row count of how many draws since each number last appeared. This will be used to break ties.

2. Including a chi-square goodness of fit test for the 150 draw window. The P value can be used by phase 2.

Speaking of Phase 2, I will be implementing that as a Markov Decision Process. Similar to a reinforcement learning AI, it will calculate the best pick and be "rewarded" if it shows in the 7 draw window.

A long discussion on data features and statistical methods has shown that I had a good setup, just lacking in features. 

This may take a long time to figure out, because I have never coded a Markov Decision Process before. I think that it will require running the full sliding test again so the MDP can "learn" what to look for.

I did start the conversation off by asking it to refrain from coding examples and stick to statistics and theory, it did that much better than Chat GPT. It did not push Microsoft solutions like copilot, and it did not hallucinate like Claude or GPT.

Using these AI agents is helpful to both confirm your ideas, and to get a healthy dose of reality check when your ideas are not good. It is like having someone to discuss ideas that is also fluent in theory and has access to the entire internet of information. (Even behind research paper pay walls!)

When I went into this hobby 20+ years ago the goal was to find slight bias in the systems. Now I have a better idea of what to look for... I may be getting closer to finally asking the right questions that have eluded me for decades.

As a result, I must get to work on how I will implement these things in my existing code base. I will continue to use the all neutral QP generator for the last 2 weeks of the "house money" on pick 3, but then the test will be suspended until this new phase 2 is ready for live testing. Not that I wouldn't continue with the QP generator IF more house money becomes available, but that is not looking too promising at this point.

Entry #475

The Markov chain as 2nd layer...

So, phase one deals with outlier identification. Phase 2 would not have to look at the history, as the model in phase one did this. It would basically take the last draw in the 150 draw history chunk and calculate all of the probabilities for each neutral and return the digit with the highest probability.

Of course there would need to be a process in place to prevent ties, perhaps this could be it's last appearance from phase 1.

Still a great deal of design work to do to understand the process, but this is definitely a start. This is all about the last state of the data, row 150, and the probabilities of the entire neutral distribution.

Entry #474

A new potential phase 2

While it has been interesting, though not quite so rewarding using the all neutral QP generator in the last few weeks, I have an idea to further process the data in phase one.

This would involve building Markov chains using the output and using the resultant Markov probability to narrow down to the neutral that would be most likely to appear in the 7 draw window for each column.

I will have to consult the writing on the math version of stack overflow and maybe some R documentation.

With the rpy2 library, I can execute R commands directly within Python, while I can use R's reticulate library to do the reverse.

I have cursory knowledge of Markov's theories at best, so this will involve some time to get a picture of what needs to be done. The QP generator will get some more use for the time being.

This would make the selection process a 2 layer approach, with the first layer classifying the numbers by frequency, then the next layer taking this data and determining the best digit to play in each column.

The goal is always to get ONE combo to play, regardless of the game. A classification phase one with a probabilistic phase 2 would result in just that... ONE best guess.

I am also replacing the definition of hot and cold from using the standard deviation to using the observed inter quartile range, as this would allow for a more robust division of classifications that is not as sensitive to the outliers in the group... standard deviation varies wildly between runs.

Entry #473

Python's random library... interesting info

Python's standard random library uses the Mersenne Twister algorithm to generate random numbers. This can also be found in the add on NumPy library as the MT19937 bit generator. It generates 53 bit precision floats over a very long period of 2^19937-1. It is, however NOT cryptographically secure.

If you are interested in the seed that generated your numbers, you can always supply your own with random.seed(46) for example, but if the seed does not change, the sequence stays the same.

Instead it will rely on it's own seed generation which you can view by querying the state...

state = random.getstate()

print(state)

Will return a tuple of information. Saving this will allow you to start up again with the same state by using 

continuedState = random.setstate(state)

Therefore I believe my QP generator to be "random enough".

Not sure what this info is good for other than Pyrhon trivia, but I also fall in the rabbit holes on occasion...

Entry #472

Going with a Python script QP for the power ball tonight...

I have not updated power ball (or mega) histories since last year... that is a project for another day.

But, it is a bigger jackpot so I have a short script to generate a QP (using all possible numbers) that will be getting a run tonight.

Going to use sorted(random.sample(range(1,70),5)) for the white balls and random.randint(1, 26) for the red ball.

Note how range(1,70) will exclude the top of the range,.. so picking from 69 numbers requires the 70 at the top, BUT randint() picks between the range bottom and top, inclusive. Gotta love the strange python stuff...

My wife wants a machine generated QP, so there is a bit of a competition potential...

Entry #471

Distributions and wondering if a pick 6 would be viable...

In the 1,000 pick 3 possible combinations are 720 combos with unique digits. Derived by 10x9x8 = 720. There are 10 triples, 000 through 999 which leaves 1,000 - 730 = 270 combos with a pair.

In the 10,000 pick 4 possible combinations, we use 10x9x8x7 to get 5,040 unique digit combinations, there are 10 quads, 342 triples, 270 two pairs and 4,338 combos with one pair.

In the 100,000 pick 5 possible combinations, using 10x9x8x7x6 yields 30,240 combinations with all unique digits, 10 all the same digits, 450 4 of a kinds, 900 full houses (3+2), 7,200 3 of a kinds, 10,800 having 2 pairs, and finally 61,200 combos with 1 pair.

So, at the pick 5, we cross over into having almost twice as many having one pair than having all 5 digits unique. It is truly amazing that the pick 5 ever gets hit at all...

What if there were a pick 6? NOT a replacement draw jackpot game, but a daily game where 6 machines are used to pick digits? Based on the lottery commission paying about 1/2 of the odds, a straight hit would be worth $500,000 !!!

I wonder if that would be a popular game?

Just for fun, the 6 digit all unique combinations would be 10x9x8x7x6x5 = 151,200...

Entry #470

Picls from today to 8/20

Let's try out posting the picks beforehand...

This week 50 cents straight and 50 cents boxed are my wager...

PA Pick 3 mid day = 113

PA Pick 3 evening = 749

Also posted in the prediction area.

These are good through 8/20 (Wednesday) next week.

The hots and colds were cut as outliers and my Python QP Generator made a QP from the neutrals in each column.

Could be way off, might catch a hit... always exciting at the start of the week... not so much at the end.

Let's see what happens!

In PA the straight return on 50 cents is $250

The box return on 50 cents is double for the pair on mid day, so $80 on the 113 and $40 on the 749.

Day straight = $330, Night straight = $290

Entry #469

Why I am still hooked on the neutrals...

While it is not a hit machine, it is the results from back testing that make the case for the neutrals at least being a viable hypothesis...

In both the PA pick 3 day and evening draws, the percentages were consistent, and these games are drawn differently, mid is a PRNG and evening is ball machines. Both histories were comprised of 25% all neutral draws, the next largest category were those draws containing 2 neutrals, and the next those containing one neutral. In fact, both histories were very skimpy on HHH or CCC draws... proving their identification as outliers. This hypothesis held for the pick 5 as well. The main difference being that there is an 85% chance of seeing at least 1 all neutral draw in each 7 draw window of the pick 3, and a 52% chance of seeing at least 1 all neutral draw in each 7 draw window of the pick 5. By interpolation, that is a 65% chance of the same thing happening in Pick 4 draws. It also holds for the Cash 4 Life, but I am still figuring out the back test script to see hard data.

I have always called this "Phase 1" because there is more needed. Trying to look at the resultant data output and pick one neutral per column has proven to introduce too much bias on my part in selection of a final combo, so I introduced an all neutral QP generator that ONLY picks from neutral numbers in each column.

Even if the combos are reduced from 1 in 1,000 to 1 in about 350, that is still a great deal to whittle away at making the final playable combo... and that is for an 85% chance of one combo being drawn from 350, not 100% that the one I pick will be drawn.

The straight shooter system was always going to be the lonely path fraught with more disappointment than success, but I chose it anyway.

I need to make a pick 3 selection for tomorrow, and have 3 weeks of house money left to catch a hit with that QP generator. Then I must choose to stay in on my own money again, or drop out until a better Phase 2 presents itself.

I have run with V-tracs back in the day...

I have run with mirrors...

I have run with workouts...

I have run with angles and line lengths on a grid...

I have run with followers...

I have back tested my way to giving up on just about every method...

Now I run with pure distribution frequency.

AND again I am running out of ideas.

Entry #468

Always on the lookout for new ideas, here is one such idea...

In the Cash 4 Life classifier, I have been using 1.5 standard deviations as an upper and lower cutoff for hot and cold.

As an alternative, I could apply an IQR (inter quartile range) where anything above or below the range given by Q3-Q1 would be the new outliers.

In the pick 3, one standard deviation above and below the expectancy does the trick. In the non replacement draw of the C4L, which has a moving expectancy and a wider range, the standard deviation may be too wild of a setpoint, where the IQR can provide a more consistent range.

I may have to plot out a comparison to visualize the difference. The problem is too many neutrals, this solution may be better than the current one. I need to get this part right before the long process of back testing.

3 draws remain on the initial Cash 4 Life 26 draw test... 3 of the numbers have appeared individually for a total of 6 matches. I did bad on the pick part of the neutrals... my phase 2 basically does not work.

In 6 weeks of pick 3 testing, there has only been 1 hit. I have 3 weeks remaining of "house money" for the pick 3 @$14/wk. That will be a 9 week run on the idea with a net zero out of pocket, including 2 shots at the pick 5 and the C4L experiment.

Though I have tested much worse systems, I need to do better than 1 hit in 6 weeks on that pick 3 to ever have another shot at the pick 5 and C4L... it is looking like those last 3 free weeks will be using the all neutral QP generator, as I have yet to identify any progress on a different phase 2 strategy.

Visualization did NOT help as much as I hoped it would. 3 more weeks of trying and then I am again faced with decision time... keep going or pull the plug and work on a different phase 2 process. I did get to keep a bit of profit as well, so if I stop in 3 weeks, I would end up ahead...

Entry #467

Finding the balance

I know what I must next do, run the big back test script on the Cash 4 Life to get hard data on the occurrence of all neutral draws in the window. I may have to adjust the Standard Deviation scalar to try and minimize the amount of digits in the neutral pool, while still holding a respectable NNNNN rate per window. It took an hour to run on the pick 3, but that was 16,800+ draws.... this one will be run, adjust the scalar, run again. May take days...

All of the calculations change in a non replacement draw scenario... variable expectancy per digit, number of training draws to allow 10 fair chance draws per ball, the hot line, the cold line, repeats across columns...

All to leave it to a QP generator in the end.

But I know it is an 85% chance per window in the pick 3, and a 52% chance per window in the pick 5... why? Because I ran the back test... the only way I will know for sure is to run the C4L back test... which is not quite 100% coded... I would say I am 85% there.

Plan remains the same... pick 3 needs to work to fund the rest... perhaps next week I try cutting the high and low neutrals to make a smaller set...

There is also the option of C4L getting a single pick per column... that would be the easiest modification.

Entry #466

Playing the last 6 draws in the Cash 4 Life test

Two groups of 10 draws, each hitting $6 on 3 separate 1+1 events. This last stretch brings the total number of draws to 26, matching the window, and the net loss to -$196

This exact scenario is why it HAD to be played on house money... out of pocket was $0

There are still 6 draws remaining, but noticing a trend here, I did not do very well at choosing from the neutrals. Given how the pick 3 is now using the all neutral QP generator, it may be some time before there is another shot at the Cash 4 Life. 

There is still the option of making the standard deviation spread tighter. The budget minded system is still worth continuing, it was just more fun to play on house money.

Here is hoping for another hit to keep it that way for awhile longer...

Entry #465

Python: Difference between sort() and sorted()

After a bit of a mix up while coding, I had discovered that I was using sort() where I should have used sorted(). Why? Because sort() will sort a list in place, but the return type is NONE, while sorted() will create a new list, leaving the original entities in tact, return type LIST.

Once I figured that out, the Cash 4 Life "all neutral" QP generator works great!

I have not updated the draw history in awhile, but just with the old data it managed to remove 7 outliers. The original script modification also worked out, now I just copy the 5 neutral lists (one per column) directly into the QP Generator where the big list is put together using set() to remove duplicates.

So that was a successful day as far as coding goes! All objectives met and tested. And a big thanks to the stack overflow community for helping to explain the difference between sort() and sorted(). As per usual, I did not need to post anything, just properly use the search there.

Entry #464