From: Bart Braem Date: 2009-01-27T19:37:55+09:00 Subject: Re: Separate random number generators? On Jan 25, 7:34 pm, Eric K Idema wrote: > Are you aware of the random gem?  I think it's exactly what you're looking for: > >  http://random.rubyforge.org/rdoc/index.html > > I use it in my game library to provide repeatable random numbers (with the > requirement that the library backs a server, so I need to have one rng per > game). > > If you need a pure ruby solution, I made a limited port of the random gem > as well.  It lacks some of the api, but draws the same numbers for a given > seed: > >  http://github.com/eki/vying/blob/912db0052151d40185309b62ceee83733b34... > > It's part of my game library, but it's only one file so you can just extract > the rng if you want to use it. > > Eric > > -- > e...@vying.org > > On 19:38 Thu 22 Jan     , Bart Braem wrote: > > > For simulation work, I want to use multiple, independent random number > > generators. Does anyone know up to date implementations? > > > I found randomr but that is inactive sinds 2001 and clearly marked > > alpha (http://rubyvm.sourceforge.net/subprojects/randomr/) > > I also found some projects from MoonWolf from 2004 but his site > > (www.moonwolf.com, see e.g.http://raa.ruby-lang.org/project/random-mt19937/) > > is offline. Which makes it hard to get to the code. > > There is a generator that uses certain sites, but that is not really > > an option. > > I am now going to look at the isaac gem, but its version number 0.0.2 > > does not make me feel very happy. > > > Did anyone find better implemenations of PRNGs? > > That random gem looks perfect, it works fine and fast. Thanks for the suggestion!