Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Has anyone used DB for any sort of problem solving? eg. Lottery Predictor....

Author
Message
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Jun 2010 03:42
The clue is in the title. Anyone tried anything odd with DB? Lottery prediction, Footie results, Asteroid trajectories, protein folding, Intelligent chat bot? Or have you thought about doing something? What would it be? I would be interested to see what peeps come up with.

http://s6.bitefight.org/c.php?uid=103081
Jeff032
18
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 13th Jun 2010 07:59 Edited at: 16th Jun 2010 14:04
.

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 13th Jun 2010 11:33
There comes a lot of maths and statistic, more accurate ressults with more data feed for base to start from.You need to reinvent the algorithm used for randomizing used to find next or close to wining ticket.Once friend of mine ask me if i can code program for this and it`s not easy.He wanted to predict when to bet on 8 of 80 numbers in a game of luck because the machine was producing fairly common 8 in sequences like 8,18,28,38... or 10,11,12,13,14...

Asteroid trajectory should be fairly easy found with less work, the chat bot can be semi intelligent but close enought to fool someone.I don`t know about other problems.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 13th Jun 2010 12:49
Quote: "He wanted to predict when to bet on 8 of 80 numbers in a game of luck because the machine was producing fairly common 8 in sequences like 8,18,28,38... or 10,11,12,13,14..."


You can't predict truly random numbers, that's what `random` means. However a lot of lottery generators use sets of rules like the distribution of numbers and their sum to create guesses. In reality they have no better chance of winning that 1,2,3,4,5,6 or any other sequence.
Daniel TGC
Retired Moderator
19
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 13th Jun 2010 14:36 Edited at: 13th Jun 2010 14:45
This can be done, providing you understand the mathematics and data collecting behind the problem. In much the same way, a user needs to understand basic trigonometry on how to make a moon orbit a planet. You must understand statistics, averages, and mathematical prediction.

For instance, if you collect the last 200 winning numbers. Then you take all of those winning numbers, and you score each number separately.

If for the last 200 numbers, 5 popped up 100 times. Then you've got a good 50% average for it. If in the last 200 games, the number 37 pops up 150 times out of 200 then you've got a 75% chance of that one popping up. Then in order to build your predictions you simply choose the 5 or 8 numbers (depending on the lottery type) based on the numbers with the highest percentage.

There are more complicated ways of doing this, but this is the prediction model at it's most basic. It's simply a matter of counting it all up, seeing which numbers appear the most. Then playing the odds.

Footie results are much the same process, but you do have a far wider range of data to process. For example, you can either simply take the play history, average out the goals won, and then apply those odds much like my previous suggestion. Or you break the problem down into additional stats, like personal player scores, team changes, injury etc. If the star striker for a team is laid up, then that teams potential falls by several percent. Again it's down to mathematics and understanding the problem. Really all your computer is, is a great big calculator. Once you've put in the data, you can sit back and watch it do all the hard lifting. But you need to describe to the computer how you want the problem solved.

Asteroid projections are the same thing, simply find the mathematical formula, describe it to your computer, plug-in the data and off you go.

Everything about your computer is based on 2 things. Logic, and math. Once you understand these things, you simply have to understand the languages commands to get the result you want.
sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 13th Jun 2010 15:13
Quote: "If in the last 200 games, the number 37 pops up 150 times out of 200 then you've got a 75% chance of that one popping up"


Assuming all factors are fair & equal (eliminating things such as the number 37 being slightly heavier so possibly more likely to be picked), that does not affect the chance of it appearing in the next draw.
Daniel TGC
Retired Moderator
19
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 13th Jun 2010 15:29
I'm afraid you're not understanding odds.

If in the last 200 draws, the number 37 appears, more than the number 24. 33. or whatever. Then it's logical to assume that the machine or system they use to draw numbers in the first place, has a natural predisposition towards that number.

Via your method of random number guessing, assuming 5 lottery numbers and 1 power ball number. You have, (please note that 1 ball is removed per round so that reduces the number of possibilities down by 1) 48 x 47 x 46 x 45 x 44 x 43 potential number combinations, that's 8,835,488,640 different combinations to choose from. A random number generator picks one of those based on the following basis

"because it did"

Number prediction, epically in betting has always been done on the basis of reducing those odds. Every time you work out, that the machine or system they use to produce the numbers in question leans towards one number over another then you reduce that 1 to 8,835,488,640 odd. Is it perfect? No, is it going to get you the winning number every time? No. But if you can reduce 8,835,488,640 even by half, then it's worth doing isn't it?
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th Jun 2010 15:50 Edited at: 13th Jun 2010 15:51
Quote: "Assuming all factors are fair & equal"


Quote: "I'm afraid you're not understanding odds.

Then it's logical to assume that the machine or system they use to draw numbers in the first place, has a natural predisposition towards that number."



Sounds like he understands it just fine though...
Saying that the machine has a natural predisposition towards a number also means that the factors are not fair & equal anymore right?

Cheers!
Sven B

Daniel TGC
Retired Moderator
19
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 13th Jun 2010 16:09
Is anything in life truly fair and equal? The point of this kind of mathematical analysis has always been to find those kinks.
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 13th Jun 2010 19:48 Edited at: 13th Jun 2010 19:54
I agree. The main drive of original supercomputing was to predict the weather. good idea, a computer is like an elephant, it never forgets. Unfortunately they still haven't cracked it. There are still factors which are missing that they cannot predict more than a day or so ahead. Eventually though they will get better and better.
I agree that lottery prediction is somewhat of a red herring as random numbers are, random, and so cannot be predicted with any certainty. Some people however have used statistical data to basically beat the machines that run the lottery. In the US, they have many lotteries and some used computer based number generators, think the of the bingo machines you used to see in working mens clubs. Some were what you would call flawed. Imagine writing a DB program to pick random numbers and not bothering to randomize it at the start. You would find that the program would have a tendency to pick the same numbers. This is basically the fault on some of these devices. A program to check for patterns would soon pick this sort of thing up.
Of course I imagine those machines have been replaced many years ago with far more reliable means.
I do remember though, in the days of the C64, spectrum, amstrad etc. I used to be involved with a mail order section of a computer store. By far the most popular titles I shipped out were Horse and football predictors. People must have been convinced they would help, as the time to just load the product would have been quite long, never mind putting in the stats. Cassette tapes were never speedy
I must admit I always fancy trying a chat bot, but it is a lot harder than you would imagine if you have never tried. There is a language based soley for making a bot, but even then, they are, complete and utter trash.
Still interesting stuff.
Edit - I remember seeing that lotto predictor ages back. I actually know the programmer that wrote it. He is quite into prediction programs and has wrote a few of them. No big wins yet as far as I know though.

http://s6.bitefight.org/c.php?uid=103081
Digger412
19
Years of Service
User Offline
Joined: 12th Jun 2007
Location:
Posted: 13th Jun 2010 20:21
Here's a Genetic Algorithm that I made. It doesn't work 100% (I think), but it will get to the number. What it does is it gives you a string of numbers and operators that simplify down to give you the number that you input. For instance, if you put in '1425' it could give you '6*8*6/1-3*1*5' as a result (there's no order of operations, just left to right). I think the problem is that the final solution can be wildly different by mutation or crossing over just a single thing or part of the string, since the answer is based on what comes before (2+5*3-1/5 gives 4, but by just changing it to this 3+5*3-1/5 it gives 4.6. Larger numbers would be even worse).

spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 13th Jun 2010 21:25
I am actively using DBPro to try and solve the Eternity II puzzle ( http://www.eternityii.com ) which basically involves fitting 256 puzzle pieces into a 16 by 16 grid so each side's colurs match. There is a 2 million dollar prize to first solver before end of 2010.

Sounds simple but many mathmeticians have agreed that even with a super-duper powerful pc or network of pcs they will never solve it within time.

I'm going for the luck factor and a backtracking type solver that tries millions of piece placements per minute, and I have got pretty good results so far, but DBPro is just not fast enough compared to other solving people that are using c# and the like.

But, as my program runs quite happily in the background and might, just might find a solution, then there's nothing to lose.

Boo!
The ace of the spade
17
Years of Service
User Offline
Joined: 8th May 2009
Location: Everywhere
Posted: 19th Jun 2010 17:16
I use it in my research any time I need to do a proof of concept. Right now I'm using it to test 3d projection that accounts for perspective, for use with AR systems. In the past I've used it on various facial recognition projects (for creating filters, not specifically making dbp do facial recognition).

“It is not clear that intelligence has any long-term survival value” -Stephen Hawking

Login to post a reply

Server time is: 2026-07-25 16:20:11
Your offset time is: 2026-07-25 16:20:11