Re: random number generator
- Posted by Jules Davy <jaydavy at onetel.com> Jul 09, 2004
- 492 views
fIgor Kachan wrote: Hi Jules ---------- > From: Jules Davy <guest at RapidEuphoria.com> > To: EUforum at topica.com > Subject: Re: random number generator > Sent: 9 jul 2004 y. 11:44 > > posted by: Jules Davy <jaydavy at onetel.com> > > Pete Lomax wrote: > > > > On Thu, 08 Jul 2004 09:12:35 -0700, Jules Davy > > <guest at RapidEuphoria.com> wrote: > > > > >I'm writing a program to test roulette systems (million+ "spins") and > > >was wondering whether eu's rand() function is adequate for this or should I use > > >a more advanced RNG such as the mersenne twister in the archive? > > Erm, > > I can safely say that I learnt almost everything I know about roulette > > from watching James Bond movies. Not quite sure how you expect anyone > > to guess whether something is adequate for a program which has not yet > > been written. (sorry if that sounds a bit harsh, it wasn't meant to > > be) It may be that rand() is ok, afaik, all reports so far indicate it > > would be fine for a million+ ints in the range 0..33[?]. > > > > You may as well try that mersenne thing and/or the new getRandInt() in > > win32lib, and/or any other you can find, in the fullness of time, but > > it sounds like you should go with rand() for now. > > > > Regards, > > Pete > > > > > > Hi Pete, > Thanks for you reply. It did come over as a little harsh - I know nothing of how RNG's work or probability distributions, so even after writing > the program I would be none the wiser as to whether rand()is > adequate or not. I just want to use the best RNG available > to simulate a roulette wheel over an extended period. This task is very complicated. Think please, you have to simulate the microdust's action, the tabacco smoke's action, the air's temperature, damp and velocity, the friction factor's changeability, the cleanliness of casino man's fingers etc etc etc ... And do not forget - there are many top secrets in this business. These secrets are really top and there is no RNG in the world to simulate them. > The mersenne twister in the archive is described as "very good", > implying that perhaps rand() is not so good? but then, > it all depends on what you want to use it for, hence my question. The Monte Carlo method requires the careful testing of all RNGs used in your task. Say, the factors above (air, dust ...) have *different* not flat probability distributions. Then you must to build all these special RNGs from the flat rand() or mersenne_twister() and have to include them in your task after special statistic testing only. > I'll go ahead and use rand() as it's the simplest option. Yes, it is simplest, it is flat and may be the basic RNG for all the special ones. > cheers, > Jules Good Luck, but I do not think the EU or another model can help in casino. Casino wins, I think. Regards, Igor Kachan kinz at peterlink.ru Igor, You're right of course, no system can negate the house advantage which remains at 2.7% for a single zero wheel. But casino profits are much more than this more like 20%! This is because punters are greedy, lack discipline, chase losses and the vast majority of them have no knowledge of the odds they are playing and don't use any system at all apart from perhaps "lucky" numbers. It's a fact that at some point 80% of players are ahead but only 20% leave with a profit. Not content with small returns they plough it all back in and lose the lot.