geoffmunn / unimatrix-zero

A simple script to generate lottery wheels (full and abbreviated).
2 stars 0 forks source link

How long should this take to run with larger sets? #3

Open Matticusnicholas opened 8 months ago

Matticusnicholas commented 8 months ago

Trying it with 69 5 5 2, generated a bunch of combinations in the cmd window and says 1 of 10 covered subsets, then no input after that. However cpu is being used according to processes. Using an i7 14700KF cpu to run the task. Thanks for this program by the way I've been looking for something like this for a very long time.

Matticusnicholas commented 8 months ago

I also have some of my own original ideas on how this could potentially get lower sets of combinations. Currently running a somewhat large (not as large as I Was just trying) problem that is actually processing and making steps towards completion. The known solution I have is about 200 sets of numbers for a 35 5 5 3, we'll see what this program comes up with.

Let me know if you are interested in my ideas for a better generative solution.

geoffmunn commented 8 months ago

Hi, Yes I would be interested :) A better solution would be really cool.

Matticusnicholas commented 8 months ago

One of My ideas is a concept I call vertical integration. Picture the sets of numbers all in a row, and the next set is below the first set. The goal of vertical integration is when the program has the choice to pick between multiple numbers when generating the set, it chooses the number that has been already used the fewest amount of times. This ensures an even spread of numbers and almost the perfect efficient use of them. I combine that with two other concepts that ensure the most efficient use.

The other concept is horizontal integration, this is a concept that has the program check for redundant use of combinations within sets it has already generated. For instance if you have a set that has the digits 1, 2, 3 within it and the program has the option to generate a combination with 1, 2, 3 or 1, 2, 4, it will choose 1, 2, 4 instead.

What you have the program do is store all possible combinations in cached memory (converting to bitmask I hear is an efficient way to store them) and say I ultimately want the program to get 3 out of 5 numbers covered in a 35 numbered set. I'll have the program first solve for covering 1 number. This would cover all 35 digits at least once to cover the first digit solved. After that I will have it solve for the second digit then the third, using horizontal and vertical integration plus whatever methods you're using if they're compatible.

Let me know what you think if it's something you can do.

Matticusnicholas commented 8 months ago

Also can you add in multithreading if possible or GPU compatibility? Larger sets take a very long time to process with the current program. I would highly appreciate it.

Matticusnicholas commented 8 months ago

I've been working on this on and off for a couple years now at least the theory behind it but I haven't been able to find someone to program it. Paid one guy to do it and he ran off with the money after not delivering the program.

Matticusnicholas commented 8 months ago

Also looks like I didn't finish running the program before on the 36 5 5 3 i was running earlier because i'm about 20% through now understanding how the program does outputs and it's making a low amount of sets so far. Looking very efficient compared to public abbreviated wheels that are available. We'll see when it finishes at 100%. Still really hope you can add in multi threading as I have a 28 thread processor and this could definitely go faster with utilizing many threads.

Matticusnicholas commented 8 months ago

I am currently trying to get Chat GPT 4 to add multi threading to the zero functions file I'll let you know if it works.