Welcome Guest
Log In | Register )
You last visited December 4, 2016, 11:27 pm
All times shown are
Eastern Time (GMT-5:00)

I wrote a Java app to generate lotto numbers...

Topic closed. 15 replies. Last post 5 years ago by Stack47.

Page 1 of 2
PrintE-mailLink
Avatar
New Member
Fort Walton Beach
United States
Member #128650
May 30, 2012
3 Posts
Offline
Posted: May 30, 2012, 1:02 pm - IP Logged

Hi all.

I'm a software engineer for Ricoh Corporation.

I wrote a Java app over the past four weeks while at home recovering from surgery that will generate lottery numbers for one game here in Florida, called the Fantasy 5. 

The numbers go up to 36 and I used lotto numbers from 1997 to now to generate a pattern recognition algorithm to predict the next sets of numbers.

I tested a few predictions and only had one full hit (all 5 numbers match) over three weeks.  According to the numbers I calculated, my program will increase my odds up to 8% my way.  It's not much because I have to play a hundred numbers a day for over ten days. 

I'm looking for a better algorithm to increase my odds a little bit more. 

Can anybody help?

    Avatar
    New Member
    Fort Walton Beach
    United States
    Member #128650
    May 30, 2012
    3 Posts
    Offline
    Posted: May 30, 2012, 1:48 pm - IP Logged

    Forgot to mention that I would share my software with anyone willing to help. 

    The application itself is rather large and it is still in its alpha testing phase.  I don't want to hard-code too much of the generator engine until I can tweak the pattern-recognition algorithm first.

    Some details about the algorithm itself:

    I used Sunita Sarawagi's CRF pattern recognition code to build the generator engine.  You can find code and explanations here:  oops, can't post the link, sorry.

    It took weeks for me to tweak the engine to teach it how to generate patterns and I thought I had locked my laptop up when I ran it. 

    Once the engine began making "hits" of individual numbers, I extended the software out to make "hits" of four more numbers, one by one.  The results of which are posted above: one full hit out of 3 weeks.  I didn't count partial hits, even though there might have been many and those partial hits pay cash, but if I win on partial hits then that will just be lagniappe to me, an extra bonus.  I'm shooting for the big hits.  You know what they say, shoot for the stars and at least you'll hit the moon. 

    The software takes a text file full of lottery numbers in the format I downloaded from the Fantasy 5 website, though the regex pattern I used to read that file could be modified to read any kind of data in any format.

    Any help on modifying the CRF engine or at least just a different method to generate wins would be great.  I will share the software with anyone that helps.

      Avatar
      New Member

      United States
      Member #125118
      March 25, 2012
      5 Posts
      Offline
      Posted: May 30, 2012, 2:25 pm - IP Logged

      sound interesting, how can I participate?

        SergeM's avatar - slow icon.png
        Economy class
        Belgium
        Member #123700
        February 27, 2012
        4035 Posts
        Offline
        Posted: May 30, 2012, 2:46 pm - IP Logged

        If the goal is to play, you must have figured out how much you want to wager.

        5/36 sounds like piece of cake. Type

        You are very confusing:
        three weeks, how many drawings, what are the payouts, how many combinations do you play, how many numbers did you pick? What is your pattern recognition?

        What?

          Avatar
          New Member
          Fort Walton Beach
          United States
          Member #128650
          May 30, 2012
          3 Posts
          Offline
          Posted: May 30, 2012, 5:20 pm - IP Logged

          Daily drawings, I simulated 100 combinations over ten drawings.  1 dollar per drawing.  That's $100 per day for ten days = $1,000 total.

          I explained the pattern recognition but I can't post the link to the source code or the documentation.

          Basically, the CRF (Conditional Random Field) learns a pattern in a stream of random integers fed to it and then spits out what might come out next.

            aquariuslottery's avatar - AquariusLotteryLogo
            Vancouver BC
            Canada
            Member #96078
            August 22, 2010
            110 Posts
            Offline
            Posted: May 31, 2012, 2:32 pm - IP Logged

            Looks like you like stats for your number predictions and look for patterns that may facilitate the task. I'm in the same ball game and believe that only stats based on actual numbers drawn have any reasonable chance of predicing future winners.

            Every lottery will have its own patterns and the further you look back (in respect of past draws) the more you will discover. Computerizing the analysis will definitely make things easier. I think most people playing lottery at least tried and observed some patterns and regularities in the otherwise irregular world of random numerical lotteries. I did it myself. And many people used these patterns and/or are still using them as I can see from posts on LP.

            Nothing wrong with discovering the paterns, it's actualy a must for success in any lottery. The problem is how these patterns are used.

            Because some paterns repeated several times many people get a perception that it's a permanent thing and assume that the pattern will continue. That a wishful thinking territory in the long run. While patterns do repeat themselves and sometimes quite often it is impossible to time them precisely. You will be off most of the time. I speak from experience because, like many others, I was lured into believing that there are patterns in pattern appearance. Fool's idea.

            Failing in predicting patterns for patterns I took another approach. I look for patterns that did not happen in the past are occuring NOW. The keyword is NOW, at this very moment. I call them SHORT TERM TRENDS. Trends in numbers appearances: frequencies, skips, lows, highs and similar. I use KISS method in number analysis and avoid too complicated computations. I don't care what the trend is, as long as I can detect it early enough to take advantage of its existance. I know it is not going to last so I observe its performance. If it comes to an end (acording to my measurements) I dump it and look for another. Not unusually, I observe several trends at a time and use the one with the best performance or potential. As always, there is no quarantee of winning but chances are increased. How do I know that chances are better? Because I compare diffrent trends occuring now and match them against some past ones. You can see right away what's better.

            Aquarius

            ......


              United States
              Member #124493
              March 14, 2012
              7023 Posts
              Offline
              Posted: May 31, 2012, 4:30 pm - IP Logged

              If the goal is to play, you must have figured out how much you want to wager.

              5/36 sounds like piece of cake. Type

              You are very confusing:
              three weeks, how many drawings, what are the payouts, how many combinations do you play, how many numbers did you pick? What is your pattern recognition?

              What?

              After deciding that the goal is to play...i needed to do some real soul searching...

              I have sat down all day to figure how much i want to wager...

              after 22 hours of mind bending thought analysis...i have come to the conclusion...

              i want to play one dollar.

              I am so confused.Thud


                United States
                Member #124493
                March 14, 2012
                7023 Posts
                Offline
                Posted: May 31, 2012, 4:38 pm - IP Logged

                Daily drawings, I simulated 100 combinations over ten drawings.  1 dollar per drawing.  That's $100 per day for ten days = $1,000 total.

                I explained the pattern recognition but I can't post the link to the source code or the documentation.

                Basically, the CRF (Conditional Random Field) learns a pattern in a stream of random integers fed to it and then spits out what might come out next.

                In my opinion...a good pattern to recognize is when all winning numbers are adjacent to the previous draw.

                So that includes all +1/-1 numbers...and repeat numbers...

                 

                So if your winning combination was 5  10  11  23  32

                your next set of numbers to wheel would be 4 5 6 9 10 11 12 22 23 24 31 32 33,  this set has only 13 numbers to play.

                this way your set is limited and the max numbers for you wheel at any given time would be 15 numbers if the previous draw has no doubles and the extreme numbers were not 1 or 37...

                I have noticed this pattern in my 5/39 game...i just have not felt enthusiastic yet to try and track it.

                its just a matter if the pattern of all numbers touching and/or repeating  is in a flag formation...or a reliable symmetric bottom.

                  RJOh's avatar - chipmunk
                  mid-Ohio
                  United States
                  Member #9
                  March 24, 2001
                  19823 Posts
                  Offline
                  Posted: May 31, 2012, 9:29 pm - IP Logged

                  Daily drawings, I simulated 100 combinations over ten drawings.  1 dollar per drawing.  That's $100 per day for ten days = $1,000 total.

                  I explained the pattern recognition but I can't post the link to the source code or the documentation.

                  Basically, the CRF (Conditional Random Field) learns a pattern in a stream of random integers fed to it and then spits out what might come out next.

                  Bottom line: Would you have won more than or as much as it cost to play?  If not, then the CRF has to learn a lot more.

                   * you don't need to buy more tickets, just buy a winning ticket * 
                     
                               Evil Looking       


                    United States
                    Member #124493
                    March 14, 2012
                    7023 Posts
                    Offline
                    Posted: June 1, 2012, 4:11 am - IP Logged

                    Daily drawings, I simulated 100 combinations over ten drawings.  1 dollar per drawing.  That's $100 per day for ten days = $1,000 total.

                    I explained the pattern recognition but I can't post the link to the source code or the documentation.

                    Basically, the CRF (Conditional Random Field) learns a pattern in a stream of random integers fed to it and then spits out what might come out next.

                    You could also compare the successes of

                    100 games versus  50 games versus 25 games...per day...

                    if your system has to play so many games...it is not predicting...it is guessing haphazardly...

                    the key question is how many games do you have to play before getting a four number win?...

                    if you play 500 games...(not at once)...you should be able to break even...

                    it is all about winning the lower tier prizes to buy more time...otherwise you are playing out of pocket...

                    if the system works than you should be mostly playing with house money.

                    there is nothing wrong with playing out of pocket...as long as you have no doubt you will win the JP...

                    I have charts for Fantasy Five 5/37...it is an easy game.

                    The Flag formation pattern is very true...same as for the Texas 5/37...If you have read the LMG...than you must have already hit a jackpot...

                    for some reason the extra two balls in the 5/39 makes the F.F. hard to spot and virtually unreliable...

                    The less balls the truer the flag formation pattern is.  Even for RNG.


                      United States
                      Member #124493
                      March 14, 2012
                      7023 Posts
                      Offline
                      Posted: June 1, 2012, 4:15 am - IP Logged

                      Bottom line: Would you have won more than or as much as it cost to play?  If not, then the CRF has to learn a lot more.

                      Do you use CRF in GWBasic??

                        RJOh's avatar - chipmunk
                        mid-Ohio
                        United States
                        Member #9
                        March 24, 2001
                        19823 Posts
                        Offline
                        Posted: June 1, 2012, 8:34 am - IP Logged

                        Do you use CRF in GWBasic??

                        I don't but maybe someone else who knows what it is does.  I was just reusing the term as incognegro used it in his post, that was the first time I had ever come across it.

                         * you don't need to buy more tickets, just buy a winning ticket * 
                           
                                     Evil Looking       

                          Avatar
                          Kentucky
                          United States
                          Member #32652
                          February 14, 2006
                          7299 Posts
                          Online
                          Posted: June 1, 2012, 11:14 am - IP Logged

                          I don't but maybe someone else who knows what it is does.  I was just reusing the term as incognegro used it in his post, that was the first time I had ever come across it.

                          "Conditional Random Field" is an oxymoron and probably another way of saying filtering all the combinations in any size matrix. And from what I read, your program basically does about the same thing without the catchy name.

                            SergeM's avatar - slow icon.png
                            Economy class
                            Belgium
                            Member #123700
                            February 27, 2012
                            4035 Posts
                            Offline
                            Posted: June 1, 2012, 11:56 am - IP Logged

                            I have a few different ways to check for patterns. If one is really obvious, then I think they would switch ball sets on purpose. Eventually the same thing happens again, even with another ball set.

                              RJOh's avatar - chipmunk
                              mid-Ohio
                              United States
                              Member #9
                              March 24, 2001
                              19823 Posts
                              Offline
                              Posted: June 1, 2012, 3:19 pm - IP Logged

                              "Conditional Random Field" is an oxymoron and probably another way of saying filtering all the combinations in any size matrix. And from what I read, your program basically does about the same thing without the catchy name.

                              That's probably true.  With so many recent members using words and terms I've never heard, it's hard to tell if they actually have any new ideas or just using new words and terms to describe the old ones.

                              Some times it seems likes newer members are reinventing the wheel and getting the same results  of others who came before them.   They are confirming rather than adding to knowledge already established.

                               * you don't need to buy more tickets, just buy a winning ticket * 
                                 
                                           Evil Looking