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

random number generator

Topic closed. 27 replies. Last post 11 years ago by RJOh.

Page 1 of 2
PrintE-mailLink
Avatar
New Member

United States
Member #29980
January 9, 2006
6 Posts
Offline
Posted: January 9, 2006, 8:23 pm - IP Logged

I recently developed a program to generate random numbers for almost any conceivable lottery game. It is an alternative to quick picks in state-run lotteries.  It's similar to the quick pick generator on this website, except for the scope ("any" game), you don't need to be on the Internet, and you can seed it with a number of your choice.  It runs on any version of Windows. I'm offering it on a try it and if you like it send me $5 basis, or I would just welcome any comments or suggestions.  It is an .exe file that you can copy to your desktop or any directory.  I'd be happy to attach it to an email for anyone who requests it.  (I use Norton Antivirus to scan every email that leaves my computer so this shouldn't be a problem.)


    United States
    Member #17555
    June 22, 2005
    5582 Posts
    Offline
    Posted: January 10, 2006, 1:28 am - IP Logged

    Thanx but someone here already made me one. But just for the pick-3. For free.

    It looked for a particular set of numbers that were likely to be shown through pattern orientation. The problem with my idea was very similar to Quantum Physics. I didn't know the outcome, until I actively looked inside to see.( Shoelinger's cat ). What I saw was that there were way too many outcomes or versions, because there were an endless amount of seeds. Therefore, an endless amount of versions or outcomes so to speak. Even when looking for a particular seed that produced patterns, well, there were none. If they had some patterns, they were short lived, and nothing to write home about.

    It basically went full circle. I ended up back to the point when I had a myriad of choices, and nothing really changed.

    So I pretty much gave up at that point, and realized that there is a pattern to chaos. It's just so very complex, only A GOD can decipher it on a regular basis.

      Avatar
      Poway CA (San Diego County)
      United States
      Member #3489
      January 25, 2004
      14120 Posts
      Offline
      Posted: January 10, 2006, 2:34 am - IP Logged

      There are so many PRNGs available for free and even True Random Number Generators that are free.  My favorite is:

      http://www.random.org/

       

        RJOh's avatar - chipmunk
        mid-Ohio
        United States
        Member #9
        March 24, 2001
        19830 Posts
        Offline
        Posted: January 10, 2006, 3:00 am - IP Logged

        If you have a GWBasic interperter, here's a free one.

        5 DIM N(100)
        10 CLS:PRINT:PRINT " FIELD SIZE:  FOR PICK5 OR GREATER NUMBERS ENTER UP TO 100";"              FOR PICK3 OR PICK4 ENTER 1000 OR 10000"
        15 C$="hit C to pick more combinations, S to start over or any other key to quit"
        20 LOCATE 5,2:INPUT "FIELD SIZE :  ",FS
        25 IF FS>100 AND FS<>1000 AND FS<>10000 THEN 10
        30 IF FS<101 THEN PRINT:PRINT " COMBINATION SIZE HAS TO BE LESS THAN";FS ELSE LOCATE 13,3:PRINT C$:GOTO 70
        35 LOCATE 9,2:INPUT "COMBINATION SIZE: ",CS
        40 IF FS=45 LOCATE 11,2:FOR X=1 TO CS
        50 N(X)=FIX(FS*RND)+1
        55 FOR Y=1 TO X-1:IF N(Y)=N(X) THEN 50 ELSE NEXT Y
        60 PRINT N(X);:NEXT X:PRINT "            "
        65 C$=INKEY$:IF C$="" THEN 65 ELSE IF C$="c" OR C$="C" THEN 45 ELSE IF C$="s" OR C$="S" THEN 10 ELSE 85
        70 IF FS=10000 THEN F=4 ELSE F=3
        75 NX=FIX(FS*RND):NX$=STR$(NX):L=(LEN(NX$)-1):N$=RIGHT$(NX$,L):LOCATE 11,2:PRINT RIGHT$("0000"+N$,F);"  "
        80 C$=INKEY$:IF C$="" THEN 80 ELSE IF C$="c" OR C$="C" THEN 75 ELSE IF C$="s" OR C$="S" THEN 10
        85 END
        

        If you have a compiler, then you can make an *.exe file.
        Good luck to you.

        RJOh

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

          Avatar
          Poway CA (San Diego County)
          United States
          Member #3489
          January 25, 2004
          14120 Posts
          Offline
          Posted: January 10, 2006, 4:07 am - IP Logged

          If you have a GWBasic interperter, here's a free one.

          5 DIM N(100)
          10 CLS:PRINT:PRINT " FIELD SIZE:  FOR PICK5 OR GREATER NUMBERS ENTER UP TO 100";"              FOR PICK3 OR PICK4 ENTER 1000 OR 10000"
          15 C$="hit C to pick more combinations, S to start over or any other key to quit"
          20 LOCATE 5,2:INPUT "FIELD SIZE :  ",FS
          25 IF FS>100 AND FS<>1000 AND FS<>10000 THEN 10
          30 IF FS<101 THEN PRINT:PRINT " COMBINATION SIZE HAS TO BE LESS THAN";FS ELSE LOCATE 13,3:PRINT C$:GOTO 70
          35 LOCATE 9,2:INPUT "COMBINATION SIZE: ",CS
          40 IF FS=45 LOCATE 11,2:FOR X=1 TO CS
          50 N(X)=FIX(FS*RND)+1
          55 FOR Y=1 TO X-1:IF N(Y)=N(X) THEN 50 ELSE NEXT Y
          60 PRINT N(X);:NEXT X:PRINT "            "
          65 C$=INKEY$:IF C$="" THEN 65 ELSE IF C$="c" OR C$="C" THEN 45 ELSE IF C$="s" OR C$="S" THEN 10 ELSE 85
          70 IF FS=10000 THEN F=4 ELSE F=3
          75 NX=FIX(FS*RND):NX$=STR$(NX):L=(LEN(NX$)-1):N$=RIGHT$(NX$,L):LOCATE 11,2:PRINT RIGHT$("0000"+N$,F);"  "
          80 C$=INKEY$:IF C$="" THEN 80 ELSE IF C$="c" OR C$="C" THEN 75 ELSE IF C$="s" OR C$="S" THEN 10
          85 END
          

          If you have a compiler, then you can make an *.exe file.
          Good luck to you.

          RJOh

          I haven't studied this, but I used to do a lot of programming in BASIC.  This program needs a "seed" or else it will start repeating.  Good BASIC interpreters have a SEED function.  Without it, the "RND" function returns a number from a built-in table and the numbers will repeat. 

          There is still nothing better than the playing card method!!

          Doesn't the compiler make a *.com file?  That's the way it used to be, but I haven't programmed or compiled in so long they (M$oft) might have changed it.

           

           

            Elizabeth03's avatar - cat anm.gif
            Nova Scotia
            Canada
            Member #9934
            December 27, 2004
            884 Posts
            Offline
            Posted: January 10, 2006, 5:09 am - IP Logged

            There are so many PRNGs available for free and even True Random Number Generators that are free.  My favorite is:

            http://www.random.org/

             

            CalifDude,

             

            I looked at the random.org website to get lottery numbers to play for Canada but could not find where to retrieve this on the program? Where could this be located?

             

            Thank you, Beth

              time*treat's avatar - radar

              United States
              Member #13130
              March 30, 2005
              2171 Posts
              Offline
              Posted: January 10, 2006, 5:30 am - IP Logged

              If you have a GWBasic interperter, here's a free one.

              RJOh

              dueling coders? Jester... could this be the start of a trend?
              A year hence, will we have threads full of macros and flavors of basic?

              I may have to borrow pac's banjo ... er ... guitar Guitar

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

                truecritic's avatar - PirateTreasure
                Michigan
                United States
                Member #22395
                September 24, 2005
                1583 Posts
                Offline
                Posted: January 10, 2006, 5:35 am - IP Logged

                CalifDude / RJ 

                RANDOMIZE TIMER

                Would be the command.

                Compilers for Basic normally output an .EXE

                Elizabeth

                There are no lottery numbers there.  You use their web programs to generate random numbers.  See the middle column labeled "HOW" - you have a choice of 2 different ones.  With (A)duplicates  (B)without duplicates.  Click the link of your choice.

                 

                 

                 

                  hypersoniq's avatar - 8ball
                  Pennsylvania
                  United States
                  Member #1340
                  April 6, 2003
                  2450 Posts
                  Offline
                  Posted: January 10, 2006, 6:03 am - IP Logged

                  SEED just picks your starting position on the list

                  TIMER is a count of the seconds since midnight

                  the only way to guarantee repeat starting position is a call to RND(-1) and a specific number for RANDOMIZE(#)  ((.0274 for example, instead of RANDOMIZE(TIMER) ))  [in M$ software, anyway]

                  you have to use an external entropy source to get away from the M$ PRNG list...

                  Playing more than one ticket per game is betting against yourself.

                    truecritic's avatar - PirateTreasure
                    Michigan
                    United States
                    Member #22395
                    September 24, 2005
                    1583 Posts
                    Offline
                    Posted: January 10, 2006, 6:12 am - IP Logged

                    Yup.
                    What you said, soniq

                      Elizabeth03's avatar - cat anm.gif
                      Nova Scotia
                      Canada
                      Member #9934
                      December 27, 2004
                      884 Posts
                      Offline
                      Posted: January 10, 2006, 7:06 am - IP Logged

                      CalifDude / RJ 

                      RANDOMIZE TIMER

                      Would be the command.

                      Compilers for Basic normally output an .EXE

                      Elizabeth

                      There are no lottery numbers there.  You use their web programs to generate random numbers.  See the middle column labeled "HOW" - you have a choice of 2 different ones.  With (A)duplicates  (B)without duplicates.  Click the link of your choice.

                       

                       

                       

                      thank you truecritic

                        Amazing Grace's avatar - lion
                        rainbow lake
                        Canada
                        Member #25177
                        November 2, 2005
                        10764 Posts
                        Offline
                        Posted: January 10, 2006, 9:01 am - IP Logged

                        Thanks for the link CD

                          RJOh's avatar - chipmunk
                          mid-Ohio
                          United States
                          Member #9
                          March 24, 2001
                          19830 Posts
                          Offline
                          Posted: January 10, 2006, 12:37 pm - IP Logged

                          There's also a Quick Pick generator on the left of this page that can be used for any type of game.

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

                            Elizabeth03's avatar - cat anm.gif
                            Nova Scotia
                            Canada
                            Member #9934
                            December 27, 2004
                            884 Posts
                            Offline
                            Posted: January 10, 2006, 1:45 pm - IP Logged

                            There's also a Quick Pick generator on the left of this page that can be used for any type of game.

                            thank you RJOhI Agree!

                              Avatar
                              New Member

                              United States
                              Member #29980
                              January 9, 2006
                              6 Posts
                              Offline
                              Posted: January 10, 2006, 2:05 pm - IP Logged

                              It's quite unlike anything at random.org or any other of the above-mentioned. I am a software developer and wrote the utility as a hobby to fill in the gap for my own personal use initially. Its standalone, so you can take it with you wherever you go. You would just have to use it to see the difference between this and other programs.  Anyway, it's free to try. If you don't find it better for your purposes than what's out there already, don't send any money. If it's a hit with you (pardon the pun), you're only out 5 bucks.

                              dthompson16@nc.rr.com