hypersoniq's Blog

Working on the vector scripts today

The excel part is done, validated and correctly functioning.

The visualization part has some work to go, and the follower script mods are finally launching, but I have to play the "squash the bugs" game.

Since the data analysis part is what is needed to start testing I am focusing time there.

Also tying in reading data from the PA Lottery RSS feed to automate updates, that one I might collaborate with AI to rapidly develop...

Using time otherwise spent on doing classwork to move forward on this project.

Classes done! Got an A- in AI, should graduate with between a 3.43 and a 3.44 cumulative GPA on the 28th of this month! Waiting for them to officially publish the grades now, but all of the work is complete!

Remember, frequency is but one part of the puzzle. I was able to create a formula that gives the total number of possible vectors in any game, which is 2N-1, where N is the number of balls in the game. In a pick 3 type game there are 10 balls, so the total possible vectors is (2x10)-1, or 19. To scale up to even the powerball becomes 2x26 =52, then subtracting 1 leaves 51. On the white balls, 2x69=138, -1 leaves 137 possible vectors. Bottom line is that the system CAN scale, it just becomes that much more complex... the -1 is because every single vector has a mirrored angle, such as 45 and -45, excepting the case if a repeat, which is always angle 0, length 1.

Entry #313

Down to 1 homework assignment and a final exam!

As this last class draws to a close, the time needed to finish the vector script will become available as soon as this weekend!

As this moment of getting my free time back approaches, I am thinking of how this new approach differs from the old approaches and I came up with... it captures the frequent pathways of numbers, not the numbers explicitly.

That means the old systems (literally all of them) were concerned with the numbers themselves, so a 5 then a 4 is different than a 2 followed by a 1... a one to one relation. the pathway, one lower to 1 higher or the opposite is a pathway and therefore can be a many to one relation from the lead in, and a one to many on the prediction as well. This type of relation will undoubtedly have a different distribution.

It will thus make picks a 2 layer process... generate the frequencies in pure vectors, then map these vectors to actual numbers in the final stage.

We start with 19 possible vectors and when picking the starting point we eliminate 9. Constraints will come into play to eliminate others, and ultimately the first valid vector to match when mapped to the actual digit will point to the pick digit.

We START with frequency because it is a solution space in which I am familiar, but this is certainly not the end...

Entry #312

Bet strategy for the Vector system (if it ever gets completed)

The same strategy applied to the original followers seems sound for this project.

$1 straight on the pick 2 (mid and eve)

IF there is a win on the pick 2, add the pick 3 for a week for $1 straight

IF there is a pick 3 win, add the pick 4 and 5 for $1 straight each for a week.

IF there is a pick 4 win... extend play for another week.

And finally, IF there is a pick 5 win...

A. Celebrate

B. Upgrade to platinum account

C. Begin the arduous task of converting the system to the jackpot games for the one and done end game!

Entry #311

What the vector system will look like...

No, I do not have visuals yet, but while still struggling to figure out how to get tuples loaded as vectors in a pandas data frame, I see how it will work when complete...

1. Start with updated draw files

2. Run the python program and save the output

3. Load the visualization graph with the last 2 numbers (n-1 and n), which will give the lead in vector. This will also fan out the 10 possible vectors (of 19) that exist for the next draw 

4. Find the lead in vector for that game position in the script output and look at the distribution frequency list. Find the first vector in this list that appears on the 10 projections from the visualization app.

5. Project that vector from the last drawn number... that js the pick.

No longer as simple as autofilling a spreadsheet or getting a pick directly from a script... but the old ways were also not producing reliable results, so trying anything at this point.

Entry #310

History not updated since 4/21...

Did not realize the hiatus was over 100 days! Last update on the data sets was April 21.

Spreadsheets are fully producing correct results and being updated. Funny how a typo on a lookup table can replicate like wildfire... with that correction the data validation (random sampling to detect the correct vector) is also complete.

During the development of the last spreadsheet for a system, I started making a text file that holds the more complex formulas for each sheet. That enabled reworking the sheets in just a few hours. (Validation is boring and long, but an absolute requirement)

Pre calculating the vectors in a lookup table reduced the complex INDEX formula to just one per sheet. Anchoring the lookup table reference allows this one formula to be populated with auto fill.

Should finish the updates by tomorrow and get a first look at what needs to be changed to run through the follower program to get vector distributions.

Entry #309

Working with vectors... how it begins...

The start of any system seems to follow a pattern.

1. Start with an idea.

2. Create a spreadsheet that will put the data into a easily consumable .csv format

3. Create a Python program to do the heavy lifting.

 

In this particular project, step 1 has taken quite some time. It is necessary to figure out how you would approach something manually before any automation could begin.

What I learned about numbers directly... in a pick n game your next pick can be from 0 to 9, and there is no safe way to eliminate any of them, their distribution resembles a unified distribution of random numbers. I have also learned that frequency is important in the long run, but not enough for draw to draw calculation. Yet frequency distribution is the DNA of a particular game history.

I have so far pre calculated the total number of possible vectors and their values, which is 19... by the grid layout, some of these CAN be eliminated by grid constraints. In the end there are still 10 possible of 19 vectors that are in play. For some vectors there may be a one to many relationship that is not immediately obvious. Much depends on the frequency distribution and the resulting curve.

Since the vectors are already known, the spreadsheet creation process to encode this data will be a simple lookup table with 100 entries, from a 0 0 repeat to a 9 9 repeat and every combo in between. This should not take long, though I will have to update the databases as well as I have let that part go while focusing on the core idea.

The visualization aspect is also of great importance, and will continue to be developed in parallel with the rest, as that represents trying to invoke the most powerful inference engine known to mankind... the human brain.

But for the third step, the first Python program will be a rework of the follower distribution script, only done with the vectors. It will most likely not be the final target, but it will help in understanding the underlying mechanics of each position in each game.

I did have a decent run of successful coding experiments between Q4 2023 and Q1 2024, but they were ultimately not successful winning number generators. The one plus to all of the previously expended effort is that just about all of the code is able to be repurposed for future projects by following common software engineering principles. Even the spreadsheets will be easier this round, as the large lookup tables already exist and just need to be filled with vectors rather than digits.

Once there is more progress on the visualization application, then the programs can all feed from the same .csv data sources.

Maybe the end game is that I finally "get it" that I lack the mental acuity to crack this age old puzzle, which still puts me in good company... and that the last 20 year half hearted chase was a waste of time. But I am still the same old stubborn person who still gets a thrill when a script works as expected, even if the results don't deliver a win. I believe I am addicted to the journey more so than disappointed at not reaching the destination...

Entry #308

I will need to step up my game and make a python gui desktop app

The visualization script does work to display the last 10 draws for one position. I need to make a program that lets the series be overdrawn for all positions on the same grid, but also toggled to show any particular series (ball 1 etc).

Before the fancier equations are applied, I think it would be interesting to rework the existing follower script to find the followers of each vector.

The trick is it may take more than one approach to find usable data.

The components planned so far...

1. A visualization component... this is where it shows the last 10 draws of any pick n game for which it has history... from pick 2 mid to pick 5 eve. Selectable and reading directly from the last 10 entries in the selected draw database. Automating the data import will be a huge difference maker when moving to the larger games.

2. A full history analyzer to get a starting point. This will be a simple rework of the follower script but using vectors rather than numbers. Here is where constraints of the grid would be applied. If a 9 was the last number, but the most frequent follower vector has a positive angle, then that can be rejected in favor of the next one on the distribution list that satisfies the constraint.

3. Some sort of discovery machine learning algorithm that can work on finding the facts of the distributions.

Finishing 1 and 2 will give a workable system, but finishing all 3 would be more helpful in creating a rules-based decision system.

Maybe the "CS guy" should figure out how to post images...

Anyway, happy coding!

Entry #307

An 8 year journey ends in August...

As I am working through week 5 of 9 in my final comp sci class, taking one per term as I have since the beginning, i am on track to graduate with a Bachelor's Degree in Computer Science on August 28th (the official publication of final grades for the current term).

On that date I can fill out the request form for graduation. 8 years ago I had reasoned that 8 years was going to pass regardless, what did I want to show for it?

It probably means less at my age of 55 than it would to a 20 some year old with regard to potential employment in the field, but I still made the journey... The next challenge will be to build things and put them into a portfolio.

Ever forward...

Entry #306

One possible advantage of vector analysis...

It removes the actual numbers!

The prediction of a vector from other input vectors does not return a number directly... you would have to apply it to the grid at the next time step and see where it terminates. You already have the origin from the last draw.

In this way, the vector paths can tell the story.

Picking a prediction would be a modular solution, so different approaches would not need a whole new script.

The key to this one is visualization... which is why this is taking so long to plan.

Like every other system, this has 2 trajectories...

1. Finally something that works (still have not found)

2. Big nothing burger (all previous attempts)

So we must look to what can be gained by the time investment...

1. Python GUI interface

2. Graphs and graphics in general

3. New applications of statistics and other math

4. New data structures (that are still being figured out)

5. The DIRECT application of both unsupervised and supervised machine learning algorithms in the discovery phase.

Why hopeful? Because by removing the numbers for analysis, patterns may emerge that were missed on previous attempts.

Entry #305

Vectors are vexing...

Seemed like a simple idea, but implementation is proving trickier than originally anticipated. 

Data storage is one area. How best to store the data for presentation? Maybe

Date, drawn number, previous drawn number, angle from last draw to current draw, length from last draw to current draw.

I guess it will be difficult to code the grid display from this data, time will tell. 

How far back to plot? Last 5? Last 10? Scrollable entire dataset?

In the analysis part, it might be best to keep it all together and then let unsupervised learning do what it was designed to do... find correlations. This part might be better to do with R than Python, but no harm in trying it with each.

The data will be somewhat less noisy as a +1 is the same vector for several number combos. I will be searching for probability, so I need to rank each of the 10 possible resultant vectors for each number in order to find out if this encoding is better than the one hot encoding of even/odd and high/low which yielded no good results.

Looks to be a long planning process to ensure the results are worth the time of statistical analysis. Oh well, saving on play money while researching!

Entry #304

Suspending play until the next system is worked out.

The odds vs what is eliminated with the followers creates too many losses between hits. Even sticking to the pick 2 only is yielding nothing.

Over the next 4 days will be the last test stretch of the follower system in any form. 8 picks for 8 games (4 mid, 4 day... total cost $8)

The system under development may take quite some time to prepare, so I suppose I am heading back to the dormant phase for play for the foreseeable future.

3 weeks to go on the current class, a week off then my final class before graduating with a BSCS on August 28th... 8 year journey at part time, but the only way to pursue a degree and work full time.

The possibilities of the upcoming vector system that make it interesting is that the actual draw numbers are not directly used...

From draw to draw there exists 10 possible outcomes when dealing with digits. When you pick a follower, for instance, you immediately eliminate 90% of your choices.

The draw was a 2, the follower is a 6... you pick 6, the next draw is a 5... you lost. You can learn that it is not always the most frequent number that ends up following, but you are left with little else than an error number.

What we are looking for with vectors are such things as information from the previous draw that could be used to predict the next vector.

Is there a connection with the angles?

Is there a connection with the magnitudes?

Can an equation be built that takes the last few vectors as input?

It will no longer exclusively rely on the numbers, they are just used as start and end points on the grid.

If you can imagine the grid to be the numbers 0 to 9 on the +Y axis and the draw dates on the +X axis, the whole problem space is confined to the first quadrant. The distance between draws is always 1. A repeat would have 0 degrees and a magnitude of 1. A 4 to a 5 would rotate clockwise on the x axis and result in a positive angle. A 6 to a 5 would rotate counter clockwise and have a negative angle. If the last draw was a 9, the grid constraints prevent a positive angle to the next draw. If the last draw was a 0, the grid constraints prevent a negative angle to the next draw.

This can all be easily visualized with plotting the graph.

There are 100 possible vectors from any previous draw to the next. Many are repeated, such as a 5 to a 4 is the same exact vector as a 1 to a 0 or a 3 to a 2.

End goal is the same as every other system I worked on (and subsequently abandoned) which is one single best guess. 

Designing systems is fun, trying out systems is also fun... constantly seeing no positive results is not.

Back to the sidelines...

Entry #303

Thanks to LP member Caspernina for the angle idea!

The analog pen and paper work of Caspernina is inspiring this next project.

The draw to draw angle is one component of a vector, which is made up of (angle, magnitude[length])

This should be a fun exercise because of the tools that can be used... trigonometry, physics, maybe even a bit of calculus in the mix.

Some times a bit of inspiration is all that is needed, so thanks again!

Entry #302

Artificial Neural Networks

The more I learn in class, the less likely it appears that Artificial Neural Networks will be applicable to picking winning lottery numbers.

I still have 2 weeks left and then my final class in AI, but under the hood is a bunch of summations and activation functions, biases and averages. Good for solving certain problems, but not ours.

Big game matrix changes are designed to keep us data starved, and small games with large histories don't fit the proper input format because of the near uniform distribution.

If someone wins with a neural net, it will be as coincidental as any other system.

Disappointing looking inside black box tech, but will save tons of time going down fruitless rabbit holes.

Speaking of fruitless rabbit holes, making progress in the "thought" phase of working with draw to draw angles. More accurately draw to draw vectors. Will soon be drafting a flow chart...

Entry #301

What exactly are we missing in prediction?

We have experimented with frequency, highest/"hot" and lowest/"cold". Yet somehow most of the results come from the numbers between them on a distribution chart.

Computing can only take us so far if we are not asking the right questions... but what are those questions?

For maybe 10 draws I have tried bot the most frequent AND least frequent numbers on the PA pick 2 with no wins. (Least frequent were paper play, but still...) One number here and there.

Still at the flowchart stage of developing a program to look at draw to draw vectors... there is a free program called Dia that is like a CAD program for flowcharts, decision trees and entity relationship (ER) diagrams that has helped with planning a project before coding.

It is currently beyond me to sort out the reason why a near normal distribution like a pick n lottery picks from the "middle" (and not always the middle) on a daily basis... but I am trying to figure that piece of the puzzle out.

System play stays at the pick 2 until a win, which seems like it will never get to the next level.

1:100 should not be this difficult, right?

Entry #300

R Studio, a free Integrated development environment

R is an older programming language that has mathematics, and in particular Statistics as a first class feature (no need to import a ton of libraries like in Python).

R Studio is a free IDE for R.

Is it easy to learn? Not really, but anything worthwhile has a learning curve.

My class in Data Mining and Machine Learning is done in R.

If you are curious about statistics, I highly recommend this free tool. It even reads the same csv files that Python does!

More to come on this...

Entry #299