Welcome Guest
Log In | Register )
You last visited January 24, 2017, 10:05 am
All times shown are
Eastern Time (GMT-5:00)

Backtesting and Simulating Lottery Systems

Topic closed. 136 replies. Last post 6 years ago by RL-RANDOMLOGIC.

Page 7 of 10
4.73
PrintE-mailLink
RL-RANDOMLOGIC's avatar - usafce

United States
Member #59354
March 13, 2008
4094 Posts
Offline
Posted: April 15, 2011, 2:11 am - IP Logged

You obviously have spent little or no time compiling lottery data.

The time depends on the amount of data you have and the amount of information you want the computer to generate.  For example I have 2243 drawings in my RC5 file and it take about .3 sec. to compare one drawing with the other 2242 but if I want to compare all 2243 with the other 2243, that's 750 secs. or about 10 minutes.  That's very fast compared to doing the same thing with paper and pencil but a super computer using a program designed by a super programmer using machine language could do the whole job in less than 10 secs.  It takes about 25 secs for my program to check all 2243 drawing combinations for length, range, sums and etc., but once I have all that information it has to be sorted several different ways to make sense of it which could take another 5-10 minutes each time sorted. Five and ten minutes here and there add up after a while and I may have spent almost an hour and that's more time than most folks are willing to spend generating data to play a game.

Keep in mind that my programs are written using a high level computer language and them complied which doesn't make the speediest computer programs.

RJOh

I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

easy turn into a couple hours. 

RL

    truecritic's avatar - PirateTreasure
    Michigan
    United States
    Member #22395
    September 24, 2005
    1583 Posts
    Offline
    Posted: April 15, 2011, 4:21 am - IP Logged

    RJOh

    I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

    the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

    would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

    mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

    of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

    10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

    easy turn into a couple hours. 

    RL

    If the programs were still in DOS and not bloated Windows, 20 MB would have taken a long time to fill (although not a lifetime).  ROFL

    To think there are individual programs now that won't even FIT on a 20 MB drive!

    It was 1987 when I got my first IBM clone with dual drives.  360,000KB 5¼" floppies.  No hard drive.

      time*treat's avatar - radar

      United States
      Member #13130
      March 30, 2005
      2171 Posts
      Offline
      Posted: April 15, 2011, 6:54 am - IP Logged

      RJOh

      I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

      the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

      would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

      mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

      of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

      10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

      easy turn into a couple hours. 

      RL

      LOL That was me with my first 1GB HD and then a few years later a "bargain" on some 9GB drives. In both cases I was all "I'll never use this much space." Remember the prices paid for those things? Seemed like good deals at the time, anyway. Crazy

      ................

      With regard to pairs, triplets, etc., these can be kept as static lists (no real need to create them every time you run your code, but not much "cost" either) 40 choose 2 or 40 choose 3 will always produce the same two groups. 780 & 9,880.

      Eg: Taking 40C2 gives 780 pairs, set an (extra) array of that depth [780x1], fill it with zeroes. That's where you'll keep score. Decide you only want to use the same pair 15 times (just an example) for a given run.

      Run a combo through every other filter (to see if you'd otherwise keep it) then compare it with the "pairs" list. If the current "score" on one of the ten pairs that subset the combo is equal to your limit, then drop that combo. If you get to the end of the list and the combo is still good, then keep it ... and update the relevant ten pairs scores (a tracking array will save you the trouble of having to run through the list twiceWink).

      There's no loop to get trapped in [aside from occasional problems between the keyboard and chairJester], once you run out of 40 choose 5 unique combos, the code ends. If you generate your combos randomly, there is more than one way to avoid getting stuck. Usually you will reach your play limit before you start reselecting the same combos over and over.

      In neo-conned Amerika, bank robs you.
      Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

        Avatar

        United States
        Member #105312
        January 29, 2011
        435 Posts
        Offline
        Posted: April 15, 2011, 8:14 am - IP Logged

        LOL That was me with my first 1GB HD and then a few years later a "bargain" on some 9GB drives. In both cases I was all "I'll never use this much space." Remember the prices paid for those things? Seemed like good deals at the time, anyway. Crazy

        ................

        With regard to pairs, triplets, etc., these can be kept as static lists (no real need to create them every time you run your code, but not much "cost" either) 40 choose 2 or 40 choose 3 will always produce the same two groups. 780 & 9,880.

        Eg: Taking 40C2 gives 780 pairs, set an (extra) array of that depth [780x1], fill it with zeroes. That's where you'll keep score. Decide you only want to use the same pair 15 times (just an example) for a given run.

        Run a combo through every other filter (to see if you'd otherwise keep it) then compare it with the "pairs" list. If the current "score" on one of the ten pairs that subset the combo is equal to your limit, then drop that combo. If you get to the end of the list and the combo is still good, then keep it ... and update the relevant ten pairs scores (a tracking array will save you the trouble of having to run through the list twiceWink).

        There's no loop to get trapped in [aside from occasional problems between the keyboard and chairJester], once you run out of 40 choose 5 unique combos, the code ends. If you generate your combos randomly, there is more than one way to avoid getting stuck. Usually you will reach your play limit before you start reselecting the same combos over and over.

        You guys picked the right time to learn how to program computers.  When I got my old Kaypro with its CPM operating system, 198K gloppies and 32k ram it came with a word processor that did everything I could imagine a computer doing, a spreadsheet so much better than a Friedan mechanical calculator, and a small db system it seemed to me someone had already done all the heavy lifting and there wasn't much point learning how to program it.  I never did.

        Now, 30+ years later every time I go to town I check out the bulletin board at the college there in hopes of finding some young hotshot willing to hire out cheaply to write a program to do what I'd like it to do.  Meanwhile I'm stuck with my windows/EXCEL memory hog and all the limitations they carry as baggage.

          garyo1954's avatar - garyo
          Dallas, Texas
          United States
          Member #4549
          May 2, 2004
          1848 Posts
          Offline
          Posted: April 15, 2011, 9:06 am - IP Logged

          RJOh

          I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

          the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

          would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

          mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

          of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

          10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

          easy turn into a couple hours. 

          RL

          RL, RJOH,

          You two are telling the story of Christmas, 1987.

          Our oldest son, Jeremy, wanted to take a spring course on computer basics, which was just beginning to be taught in high school. So we decided to get him a Tandy 256 with a 5 1/4, 360K, floppy drive. When I saw the guy demonstrating it, and heard the assurance that Tandy was not going out of business because it had Radio Shack's backing. I decided I had to have one to see what this monster was all about.

          Wrote my first program on it too. Made my first $25 bucks programming by selling an addition/subtraction program to one of those magazine that used to include a disk. It wasn't much but I also got a years subscription to the magazine so I thought it was cool.

          Added a 300 baud modem which took 2 minutes for a page to load! And a dot matrix printer with tractor feed paper. Some days I'd like to have that printer back. Those ribbons lasted a lot longer than an ink cartridge does today too.

          Ah! The good old days.

            time*treat's avatar - radar

            United States
            Member #13130
            March 30, 2005
            2171 Posts
            Offline
            Posted: April 15, 2011, 10:43 am - IP Logged

            Yeah, those old dot-matix printers were built like tanks (and made almost as much noiseLOL).

            No middle-of-the-night printouts on those things. Drum

            I still have one around here, somewhere, but my newest PC doesn't have 25-pin ports.

            Owned a few ink-jet printers in the mean time, and only found one model that went the distance.

            In neo-conned Amerika, bank robs you.
            Alcohol, Tobacco, and Firearms should be the name of a convenience store, not a govnoment agency.

              Avatar
              Kentucky
              United States
              Member #32652
              February 14, 2006
              7344 Posts
              Offline
              Posted: April 15, 2011, 10:43 am - IP Logged

              RJOh

              I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

              the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

              would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

              mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

              of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

              10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

              easy turn into a couple hours. 

              RL

              Mine was the Tandy Color Computer that used a tape recorder or one external 5.25 360K floppy drive. I had to copy each component on another floppy disk to use Microsoft's Desk Mate program. Tandy also made a pocket computer that used a docking station to download programs off  cassettes.

                mayhem's avatar - 142g5yd
                Fort Worth, TX
                United States
                Member #106060
                February 11, 2011
                188 Posts
                Offline
                Posted: April 15, 2011, 11:14 am - IP Logged

                mayhem

                For me it's a matter of finding supporting data.  I know my choices are just guesses in the grand scheme

                of things but a guess can have a lot of thought behind it.  I can set everything and make a run in less then

                5 minuets if I just wanted to take the top 2 or 3 values for each filter or stage  but I wait for certain cycles and

                then hold off as long as I dare and then make a very refined run.  My main system goes through every set

                in the matrix each run and may find as few as 10 lines total.  There are certain mixes of key values that

                when combined reduce a rate that is almost unbelievable.  I have to wait until so many of these values line

                up so to speak before I attempt to play.  It is easy for me to reduce to less then 20 lines any day if I want to

                use many of the filter options but I find that when using many settings I make many mistakes.  I like to think

                of playing the lottery like looking for a lost treasure.  Each night I get out all my information and make a plan

                where I will search the next day.  I don't worrie about someone finding it before I do because a new chest

                will take it's place the next draw.  Playing the Lottery should be fun because it is a game and where else 

                can you hunt a major treasure from your favorite easy chair.  Most days the wife will even run and pick up

                the tickets.     

                RL

                Thank you for the explanation RL. It's tidbits like these that help others figure out the "mind" of a lottery player. :)

                 

                And this is exactly why I posed the question. I was wondering if it was a complex algorithm or the human element that was taking the time.

                How you do anything is how you do everything.

                  mayhem's avatar - 142g5yd
                  Fort Worth, TX
                  United States
                  Member #106060
                  February 11, 2011
                  188 Posts
                  Offline
                  Posted: April 15, 2011, 11:29 am - IP Logged

                  You obviously have spent little or no time compiling lottery data.

                  The time depends on the amount of data you have and the amount of information you want the computer to generate.  For example I have 2243 drawings in my RC5 file and it take about .3 sec. to compare one drawing with the other 2242 but if I want to compare all 2243 with the other 2243, that's 750 secs. or about 10 minutes.  That's very fast compared to doing the same thing with paper and pencil but a super computer using a program designed by a super programmer using machine language could do the whole job in less than 10 secs.  It takes about 25 secs for my program to check all 2243 drawing combinations for length, range, sums and etc., but once I have all that information it has to be sorted several different ways to make sense of it which could take another 5-10 minutes each time sorted. Five and ten minutes here and there add up after a while and I may have spent almost an hour and that's more time than most folks are willing to spend generating data to play a game.

                  Keep in mind that my programs are written using a high level computer language and them complied which doesn't make the speediest computer programs.

                  Thank you for taking the time to explain that RJOh. I actually have spent quite a bit of time compiling data. In fact the computer only takes a few minutes at most analyzing the data but when I step into the process, well that is easily days of work. But then again, I'm a newbie and very inefficient. I just wanted to know what part of the process the seasoned professionals were taking so long at so I know what to look forward to in the future and make sure I don't waste too much time.

                   

                  Side note: People act like we don't have time machines. Yet we do. Just asking questions to those that came before you and observing where there at now. Good enough for me.

                  How you do anything is how you do everything.

                    mayhem's avatar - 142g5yd
                    Fort Worth, TX
                    United States
                    Member #106060
                    February 11, 2011
                    188 Posts
                    Offline
                    Posted: April 15, 2011, 11:36 am - IP Logged

                    My first computer ran windows 98 with 16 gigs. Type

                     

                    Now I'm rolling on 7 and several terabytes worth of media. Thank you Netflix and DVD copying software. Cheers

                    How you do anything is how you do everything.

                      RJOh's avatar - chipmunk
                      mid-Ohio
                      United States
                      Member #9
                      March 24, 2001
                      19904 Posts
                      Offline
                      Posted: April 15, 2011, 2:14 pm - IP Logged

                      RJOh

                      I wrote my first lottery program on a tandy computer.  It had two external 5.25 360K floppy drives and was

                      the envy of everyone.  I remember that I had to put in the first disk and turn it on then after it read that disk I

                      would need to put in a second disk before it would boot to a A:\ prompt.   I later got a 20mb HDD for it that was

                      mounted on a ISA card.  I think it was called a winchester drive.  I remember thinking that it would take the rest

                      of my life to fill a 20mb drive.  I know what you mean about the time it takes to run that much data and a few

                      10 minuet runs can add up.  Add to this writting some small bit of code to test some new idea and it can very

                      easy turn into a couple hours. 

                      RL

                      Sounds like we both traveled similar paths but mine started out with a TI computer and then to a Commode 64 before I bought a Tandy1000.  Both the TI and Commode had a console Basic that were similar to Tandy RS Basic which was GWBasic with a few extra features. 

                      Some of the routines I used on my Tandy computer I still use in my GWBasic programs today.  I fear Window7 will end my use of GWBasic but for right now I still have a couple of computers with WindowXP that still have a few years left so I have time to learn a new version of Basic and rewrite my programs to work with Window7 or higher. 

                      I'm just lucky that the last XP computer I bought was a HP which has lasted longer than PackardBell and E-machine computers I bought earlier.  After a couple of years their power supplies couldn't support the extras I added and a bigger power supply wouldn't fit in them.  My old 8088 Tandy1000 never did quit, time past it by with VGA and faster processors.  I was sorry to see Radio Shack give up the Tandy brand, they made computers that lasted and didn't over heat after a couple of years and quit.  My old Commode has a similar problem which quicken my purchase of the Tandy1000.

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

                        RJOh's avatar - chipmunk
                        mid-Ohio
                        United States
                        Member #9
                        March 24, 2001
                        19904 Posts
                        Offline
                        Posted: April 15, 2011, 2:42 pm - IP Logged

                        Thank you for taking the time to explain that RJOh. I actually have spent quite a bit of time compiling data. In fact the computer only takes a few minutes at most analyzing the data but when I step into the process, well that is easily days of work. But then again, I'm a newbie and very inefficient. I just wanted to know what part of the process the seasoned professionals were taking so long at so I know what to look forward to in the future and make sure I don't waste too much time.

                         

                        Side note: People act like we don't have time machines. Yet we do. Just asking questions to those that came before you and observing where there at now. Good enough for me.

                        I just wanted to know what part of the process the seasoned professionals were taking so long at so I know what to look forward to in the future and make sure I don't waste too much time.

                        Self-taught rather than seasoned professionals might be a better description.  If you learned to program from a professional at a school then you probably avoided some of the bad habits one can develop when self-taught that make a computer program very inefficient.   Also some of the latest versions of the high level languages have routines which took several lines of code to duplicate in their older versions.

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

                          RL-RANDOMLOGIC's avatar - usafce

                          United States
                          Member #59354
                          March 13, 2008
                          4094 Posts
                          Offline
                          Posted: April 15, 2011, 4:30 pm - IP Logged

                          If the programs were still in DOS and not bloated Windows, 20 MB would have taken a long time to fill (although not a lifetime).  ROFL

                          To think there are individual programs now that won't even FIT on a 20 MB drive!

                          It was 1987 when I got my first IBM clone with dual drives.  360,000KB 5¼" floppies.  No hard drive.

                          truecritic

                          I hear what your saying.  I remember doing a video upgrade and the kit came as a handful of 16 or 18 pin

                          IC's. You had to plug each one in a empty socket on the motherboard.  I think it was a 32KB upgrade.  I

                          loved the sounds those old PC made, sounded like a airplane starting up.  zipping, buzzing, beeping, aaanttt,

                          clicking. Cooooool. Did yours come with the little book/folder for your OS floppies.

                          RL

                            RL-RANDOMLOGIC's avatar - usafce

                            United States
                            Member #59354
                            March 13, 2008
                            4094 Posts
                            Offline
                            Posted: April 15, 2011, 4:42 pm - IP Logged

                            Mine was the Tandy Color Computer that used a tape recorder or one external 5.25 360K floppy drive. I had to copy each component on another floppy disk to use Microsoft's Desk Mate program. Tandy also made a pocket computer that used a docking station to download programs off  cassettes.

                            Stack

                            I think I still have a box of those old tapes, they looked like a cassette tape.  I also had a old colorado tape drive

                            I used as a backup, don't remember the year.  I still have a tandy dot matrix printer that I use with a data logger

                            from time to time.  That stuff was so cool back then.  300kb modem LMAO my first modem was a 9600. 

                             

                            RL

                              RL-RANDOMLOGIC's avatar - usafce

                              United States
                              Member #59354
                              March 13, 2008
                              4094 Posts
                              Offline
                              Posted: April 15, 2011, 4:54 pm - IP Logged

                              Sounds like we both traveled similar paths but mine started out with a TI computer and then to a Commode 64 before I bought a Tandy1000.  Both the TI and Commode had a console Basic that were similar to Tandy RS Basic which was GWBasic with a few extra features. 

                              Some of the routines I used on my Tandy computer I still use in my GWBasic programs today.  I fear Window7 will end my use of GWBasic but for right now I still have a couple of computers with WindowXP that still have a few years left so I have time to learn a new version of Basic and rewrite my programs to work with Window7 or higher. 

                              I'm just lucky that the last XP computer I bought was a HP which has lasted longer than PackardBell and E-machine computers I bought earlier.  After a couple of years their power supplies couldn't support the extras I added and a bigger power supply wouldn't fit in them.  My old 8088 Tandy1000 never did quit, time past it by with VGA and faster processors.  I was sorry to see Radio Shack give up the Tandy brand, they made computers that lasted and didn't over heat after a couple of years and quit.  My old Commode has a similar problem which quicken my purchase of the Tandy1000.

                              RJOh

                              I think that much of your code will run in QB64 which will be around for a long time.  Those that want to 

                              do some basic programming should  try it out.  About anything needed for lottery can be done in basic.

                               

                              RL

                                 
                                Page 7 of 10