hypersoniq's Blog

Cutting the cost of play, choosing the angular followers as a seed.

Within the vertical horizon output, I noticed that the picks generated by the angular followers had more matches (not a win yet, but more matches) than the direct follower pick.

By choosing one, the cost of playing the live test for awhile is cut from $16 to $8, and covers 1 day and 1 eve draw for that $8.

Also continuing with the $0.50/0.50 straight box combo over the usual $1 straight only, at least until a few draws play out.

A dual system test on the pick 5 would cost $24, and that can be funded by a $40 or $80 box hit just as easily as a straight hit, and have slightly better odds of happening a little more frequently.

Really breaking out of the "comfort zone" of 1 pick or none... intermingling column data, and I found a use for the Python Dictionary to count in the new program, that probably represents in an 18x reduction in code in that section vs using and updating single variables. So even if a win is never produced, it was valuable experience in coding again, the one true constant gain in this hobby.

Entry #328

First picks...

For the PA pick 3 evening are 2 sets, one using the regular follower seed and one using the angular follower seed...

A. 5 5 5,   4 0 6    (seeds [numeric / angular])
B. 5 4 0,   4 1 2    (locking the first seed)
C. 0 5 0,   8 0 9    (locking the second seed)
D. 0 8 5,   0 9 6    (locking the third seed)

Also for tomorrow's PA pick 3 mid day drawing...

A. 9 4 8,   3 7 9
B. 9 2 8,   3 7 2
C. 1 4 0,   2 7 5
D. 9 1 8,  9 4 9

Because of the sheer volume of picks, they were played 0.50 straight / 0.50 box. (Excepting of course the 5-5-5, which is $1 straight)

Total cost = $16

Did my part, now it is up to the state... again...

Entry #327

Successful run of new system... now to update the draws and test.

Finally came up with code that tracks the most frequent numbers in the other columns when given one column as a seed.

Passing in a combo locks the columns by those numbers and prints the frequency distribution of 0-9 in the other columns.

Tomorrow (well, later today) will be all about updates so the data can be tested. First by verifying (does the code count of the seed numbers match a countif in the spreadsheet? Also, when filtered, do the top counts match in the other columns?) Then by updating all but the last draw to see if it works better with followers as a seed or angular followers...

Surprisingly rapid development on this one once I dialed in the main data structure, which was a list of tuples. Because tuples are immutable, there is slightly less memory required when running the code.

Weighing in at less than 80 lines of code...

Also will put the finishing touch on the version that does pick 5 games... that one is looking like it will come in at around 100 lines of code.

Of course it remains to be seen if it picks any winners at all, but don't ALL systems break apart at that stage anyway?

Syntactically and semantically correct is my part, the rest is up to the state...

Entry #325

New projects need corny project names, so...

I have begun planning of "Vertical Horizon"...

This is the combo frequency analysis program. It will be using the vertical follower analysis from "Follower Foundry" as the seed combo.

Some early file read systems to put it in the correct data structure were successful.

Initializing the list as history = [ ] creates the main list, and when reading in the rows,

Row_x = history.append()

Creates an addressable combo entry.

What we have is the ability to isolate internal combos by position, so the first position of the 1,000th draw would be 

history[999][0]

This is respecting the 0 indexing of Python.

To gather information on a specific first digit, would need to iterate

history[n][0] == 5

And count history[n][1] and history[n][2] for the pick 3.

In that way, the accumulator for the main loop could be 

For each [n][0] == 5:

    If [n][1] == 0:

          B_zero += 1

Etc. Then the B zero through 9s will be combined with their counts into an accumulator list of lists, sorted by the count... this will then be used in printing the results side by side by highest count. Same for the C numbers.

Whole process repeated for the history[n][1] and history [n][2] positional seeds.

The play strategy has been revised to include only one pass at the pick 5 on a pick 3 win, eliminating the pick 2 and pick 4. Will also probably play the seed number as it is a follower pick.

Cost...

Pick 3 day $4

Pick 3 eve $4

Pick 5 day $6

Pick 5 eve $6

Though the pick 5 numbers won't see the light of day until there is a pick 3 win. (If one happens)

The hardest part of this setup will be verification... never worked across columns before in any meaningful way. Unless I count the top result from the history in excel and see if that number combo matches the frequency... that might work.

Entry #324

Starting a new frequency project.

For my entire lottery number crunching history I have only ever studied each column of games like the pick 3 in isolation, treating it as sequential games of 1 in 10 rather than the true 1:1000 the game actually is.

The next project will attempt to count frequencies across combos. Definitely a first for me.

It will analyze, by position, a starting combo and count the numbers that appeared with each number in each position. It will end up with 3 likely combos to play rather than 1, but what is the point of reinventing a wheel that uses the exact same mechanics again and again?

Credit where credit is due.... this idea was brought to light by Dr. San in the Lottery Discussion forum.

I do not think that we will break any ground other than getting me out of my "columnar isolationism", but challenges are a good way to stay sharp coding.

Since this will generate more lines to play, I will be skipping the pick 2 and the pick 4, instead focusing on the pick 3 (3 combos per draw) and adding the functionality for the pick 5 (5 combos per draw).

After the massive coding part will be a short test on the pick 3, and the seed combo will be the pick generated from the frequency script.

In other news, PA RSS feed sucks to work with, they should just put up an API like most other state lottery sites... would not be surprised to hear that they run the entire operation on a Commodore VIC 20 in COBOL...🙄

Still trying to make that auto updater for the csv files, but hitting way too many obstacles in reading the results cleanly and consistently...

JSON pa lottery coders... JSON! Try it sometime!

Entry #323

Early observations with most recent data

1. The PA mid day seems to be more in tune with the direct follower data. (RNG draw)

2. The PA evening seems to be more in tune with the angular data. (Mechanical draw)

 

This makes sense as I had no hits on the follower system at night on any game but did catch a straight on the mid day pick 3. Because all of the follower and angular follower data can be generated in one script, they can be studied more carefully.

Now it is time to try and notice what indicators may show where in the distribution list the next pick will come from, as it is not always the most frequent.

I must resist the desire to take one observation and make it a rule without stepping through multiple draws to see if indeed the observations hold.

Will be trying to import the data into R studio and getting some actual statistics and graphs, but I still need to find the missing puzzle pieces... why must this be so difficult?

Oh well, back to the data until I leave for work.

Happy data analytics?

Entry #322

"Numbers" are just paint on a ball...

The whole concept of these lottery numbers is that the numbers themselves are nothing more than a marker... a 5 has no higher or lower value than a 1.

We know that a pick 3 game has the numbers 0 to 9 available in each of the 3 machines, so 10x10x10 = 1,000 possible combos for which they pay out about half ($500 for $1 straight in PA). They could have easily used letters... imagine a pick 3 with A-Z as the markings... 26x26x26 = 17,576 possible combos... using the same logic, the payout would be $8,788.

The point being that the numbers themselves do NOT have mathematical properties, though we keep trying to search in that space for a solution.

When I made the move from number manipulation to frequency statistics, it painted a picture that was different from what I looked at before, however the results so far have not indicated any better way to generate a pick, because the basic truth is that the highest frequency followers are not always picked. They will be picked most of the time, but generally not at the same time...

So far, I have been able to generate a list of the distribution of all "numbers" that follow the last draw... this runs in seconds and can process all games. Then, I did the same for the angles between draws... again being able to get a distribution list for ALL follow up angles based on the last 2 draws... if the "numbers" do not have numeric properties, why would I imagine they would have physical properties? They, in reality, do not...

Today I will be reworking the input files to include both number followers AND angle followers. I am honestly unsure what good this will do, but I like to keep sharp with coding so why not...

How many times will I do this? How many ideas that deep down I know will not work will I try? Starting to think that I am just a moron with some coding skills that refuses to admit the impossible nature of trying to predict "random" results... or I am just an avid hobbyist...

Either way I seem to have a darker outlook on ever making headway in this endeavor.

Entry #321

These systems are ultimately a source of frustration...

However, in this case it might be best to run both the direct digit follower script AND the angular follower script as one.

Because of the modular adaptive code, all I have to do is add the numbers back in to the csv files. 2 hours work tops. Performing the upgrade BEFORE updating the draw data will allow a chance to see the puzzle pieces while knowing the next answer...

Which system is a better contributor to the desired outcome?

Can one result influence the other?

Can the data from both systems be used together?

Let's find out...

Entry #320

Noticing some things in the angle data...

Mostly the number of repeats! When looking at data with straight numbers, a 4 followed by a 4 might go unnoticed... but when looking at a 0, which represents the angle of a repeat, they are all over the place. In the bell curve, the zero is at the top, with +1 next on one side and -1 on the other.

The closest call on the pick 2 so far was the 8/24 evening. The previous draw was 7 4. The pick was 7 (because a repeat was most likely) and a -2, which gave me a 7 2 pick, the result was 7 1.

Tomorrow's mid day called for a double repeat, last draw was 9 9, so I went with 9 9, will see how that does. It might be that the angle magnitude serves as a better indicator of when NOT to play, wouldn't that be useful?

Entry #319

First test of the angle frequency system...

Set up with $1 Straight on the p2, p3 and p4 in PA. (Still working on the p5 csv files). Tickets in hand for mid day and evening ($6 total)

Not as simple as follower picks, and needs history files updated daily.

Hopefully this system does better than the long list of failed previous attempts...

Entry #318

Mission Accomplished! (Non lottery)

Started in the June, 2016 term taking 5 classes per year toward a Bachelor's Degree in Computer Science. Finished the last class last Friday, just waiting until the 28th until the school calendar indicates they publish the current term grades... they published a week early, so it is official! 120 credits, 3.44 cumulative GPA... Made it!

8 years ago I sat staring at the registration form, reasoning that 8 years was going to pass regardless, what did I want to show for it...

In many ways, I feel like the same dumbass who decided to start such a journey, and now that it is finished, it will take some time to adjust all of the study time back into "free" time.

Still an avid hobbyist at trying to solve impossible (or at least improbable) problems,  I just now have more tools in the toolbox that I can throw at the hobby.

Entry #317

Getting there...

Got the Python program working, now I need to modify the column processing to take the last angle using lastAngle = df.iloc(-1) so each column has the correct angle instead of displaying all 19 angles for every column. Should be an easy modification.

Up next is using the visualization tool to show valid vectors (their angles being most important at this time) i will run the script 10 times with lead in numbers 0 through 9 and take a pic of each, in order. This should help simplify the pick process. This makes it faster and limits the information displayed to only the relevant angle in question for each column. BIG gains in speed and efficiency when scaling up later to the big games.

Start with the highest frequency follower angle and if it appears in the valid list of 10 for the last drawn number, that is your pick. If it is not on the list then it violates the upper or lower bound constraint, therefore check the next most frequent.

Spent time making sure the spreadsheets are all perfect. Plan for today...

1. Get the script exactly where it needs to be

Modicy the visualizer to get photos of all possible angle lead ins (the time consuming part)

2. Update all draw histories (last was 8/17)

3. Export the required .csv data (the other time consuming part)

4. Figure out and record the exact steps to make a pick.

If all goes well, might have a live test by the weekend!

Entry #316

Super early, but interesting results..

So far I fixed the spreadsheets to convert draw to draw as an angle. I put together a workflow to export just the date and the angles to a .csv file, and I reworked the Python program to count the frequency of angles rather than direct numbers.

Though I still have to work on the visualization app, I did notice something interesting...

 

No matter how the data was presented earlier, the plot of the frequency distribution was near uniform... looking at the PA pick2 eve... the distribution has more of a bell curve shape! This is what I was hoping to see!

I still have to fan out the end of the graph to display the 10 valid angles so the result can be converted into a pick, but I have mixed up data many ways before and always ended up with the dreaded uniform distribution... IF it works is still to be determined, but it sort if feels like notable progress...

Happy Coding!

Entry #315

Dealing with coding setbacks.

After multiple attempts to get the follower script to work with vectors, it is apparently not simple to do with Pandas data frames.

In the past, I would most likely have given up at this point (or maybe not even gotten as far), but now I can leverage the education to find a solution... 

Since the unique part of the vector for frequency was the signed angle, I just need to regenerate the .csv files from the spreadsheets after replacing the vectors with just their signed angle... If I need the whole vector in the future, it is simple trig to regenerate the line lengths.

This means a full rework of 8 spreadsheet lookup tables, but after the first is reworked, the other 7 are simply copied...

Then converting only what is needed to .csv

Then rolling back to an earlier version of the follower program... that part is easy when using version control software like GIT and meaningful commit memos.

So the setback is not that bad, and following software engineering best practices leads to this challenge being relatively easy to overcome.

Speed was looking good though, the entire program did run in under 60 seconds, it just was unable to determine the appropriate follower counts.

Entry #314