1. Suggestion for 2.4+: Mersenne Twister
- Posted by Rod Jackson <rodjackson_x at hotmail.com> Sep 11, 2001
- 539 views
Hi all, Here's an idea I want to toss out, to Rob for future versions of Euphoria: While Eu's pseudorandom algorithm is adequate for most purposes, I've found a good deal of "pattern" in the results when used "en masse". I would suggest that Rob switch to using the Mersenne Twister; it has numerous advantages over most other algorithms. I would make use of it in IGT myself, with the Euphoria translation of MT, but an interpreted algorithm appears to be too slow. Downside: it could break code. But then hopefully any software that *depends* on rand() for consistency would have taken into account the idea that the random-number generator could change. Rod Jackson
2. Re: Suggestion for 2.4+: Mersenne Twister
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 12, 2001
- 485 views
Rod Jackson writes: > I would suggest that Rob switch to > using the Mersenne Twister; it has > numerous advantages over most other > algorithms. Thanks for the suggestion. I know of a few user programs that would break if I changed the random number generator. I also wonder if Mersenne would be significantly slower than what we have now. I haven't measured anything, but at first glance there seems to be a lot more computation going on than with the current rand(). Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Suggestion for 2.4+: Mersenne Twister
- Posted by "Thomas Parslow (PatRat)" <patrat at rat-software.com> Sep 12, 2001
- 467 views
<snip> > I would suggest that Rob switch to > using the Mersenne Twister; it has > numerous advantages over most other > algorithms. I would make use of it in > IGT myself, with the Euphoria translation > of MT, but an interpreted algorithm > appears to be too slow. <snip> > Rod Jackson Maybe it would be worth implementing it in Assembly and just calling it from eu code? Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.rat-software.com/ Please leave quoted text in place when replying
4. Re: Suggestion for 2.4+: Mersenne Twister
- Posted by Kat <gertie at PELL.NET> Sep 12, 2001
- 480 views
On 12 Sep 2001, at 16:53, Robert Craig wrote: > > Rod Jackson writes: > > I would suggest that Rob switch to > > using the Mersenne Twister; it has > > numerous advantages over most other > > algorithms. > > Thanks for the suggestion. > I know of a few user programs that would > break if I changed the random number generator. > I also wonder if Mersenne would be significantly > slower than what we have now. I haven't measured > anything, but at first glance there seems to be > a lot more computation going on than with the current rand(). Yea, Rod, sheesh! When we call rand(), we do it to get the cpu to execute a short burst of code fast, not to get a real random number! Kat
5. Re: Suggestion for 2.4+: Mersenne Twister
- Posted by rforno at tutopia.com Sep 12, 2001
- 496 views
Rod, would you explain the Mersenne Twister algorithm? Thanks. ----- Original Message ----- From: "Rod Jackson" <rodjackson_x at hotmail.com> To: "EUforum" <EUforum at topica.com> Subject: Suggestion for 2.4+: Mersenne Twister > > > Hi all, > > Here's an idea I want to toss out, to > Rob for future versions of Euphoria: > > While Eu's pseudorandom algorithm is > adequate for most purposes, I've found > a good deal of "pattern" in the results > when used "en masse". > > I would suggest that Rob switch to > using the Mersenne Twister; it has > numerous advantages over most other > algorithms. I would make use of it in > IGT myself, with the Euphoria translation > of MT, but an interpreted algorithm > appears to be too slow. > > Downside: it could break code. But then > hopefully any software that *depends* > on rand() for consistency would have > taken into account the idea that the > random-number generator could change. > > Rod Jackson > > >
6. Re: Suggestion for 2.4+: Mersenne Twister
- Posted by Robert Craig <rds at RapidEuphoria.com> Sep 13, 2001
- 538 views
Rod Jackson writes: > Anyhow, as I said the Twister's version > of rand() seems to be a very superior > algorithm to the C standard, with many > advantages: 1. I don't think there is any C standard for the algorithm used in rand(). ANSI specifies only the minimum range of values returned. 2. Euphoria has its own rand() implementation. It does not call the rand() function in any C library. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com