comp.lang.ada
 help / color / mirror / Atom feed
* Ada implementation of Mersenne Twister (MT19937)
@ 2002-01-28  8:43 Adrian Hoe
  2002-01-31  6:43 ` Bobby D. Bryant
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Adrian Hoe @ 2002-01-28  8:43 UTC (permalink / raw)


Hello,

I could not find an Ada implementation of MT19937 pseudo random number
generator by searching CLA. So, I decided to port Makoto Matsumoto and
Takuji Nishimura's work to Ada.

Thought someone might be interested to use MT19937. You can download
the source from my web site at http://greenlime.com/users/adrian.hoe

                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
       [not found] <200201281013.LAA04729@bulgaria.otn.eurocopter.de>
@ 2002-01-28 20:00 ` Christoph & Ursula Grein
  2002-01-28 22:21   ` Jeffrey Carter
                     ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Christoph & Ursula Grein @ 2002-01-28 20:00 UTC (permalink / raw)


> From: byhoe@greenlime.com
> To: comp.lang.ada@ada.eu.org
> Subject: Ada implementation of Mersenne Twister (MT19937)
> Date: 28 Jan 2002 00:43:35 -0800
>
> Hello,
>
> I could not find an Ada implementation of MT19937 pseudo random number
> generator by searching CLA.

Is this what you are looking for?

  --                   Random Number Generator
  --
  -- The algorithm was developed by George Marsaglia,
  -- Supercomputer Computations Research Institute,
  -- Florida State University
  -- (ref. to Ada LETTERS, Volume VIII, Number2, March/April 1988).

I've an implementation together with a test driver. It produces the prescribed 
result.
Whoever is interested I will send.

> So, I decided to port Makoto Matsumoto and
> Takuji Nishimura's work to Ada.
>
> Thought someone might be interested to use MT19937. You can download
> the source from my web site at http://greenlime.com/users/adrian.hoe

Didn't have yet a look at the above...

>
>                               -- Adrian Hoe
>                               -- http://greenlime.com/users/adrian.hoe


                                 o     _      _          _
 --------- __o       __o      /\_    _ \\o   (_)\__/o   (_)
 ------- _`\<,_    _`\<,_    _>(_)  (_)/<_     \_| \    _|/' \/
 ------ (_)/ (_)  (_)/ (_)  (_)         (_)    (_)     (_)'  _\o_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mein Radunfall
My bike accident


Christoph Grein
Mitglied von Ada-Deutschland
Member of Ada Germany
http:/www.ada-deutschland.de

http://home.T-Online.de/home/Christ-Usch.Grein
eMail: Christ-Usch.Grein@T-Online.de




^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28 20:00 ` Christoph & Ursula Grein
@ 2002-01-28 22:21   ` Jeffrey Carter
  2002-01-28 23:34   ` Hugo Pfoertner
  2002-01-29  0:08   ` Preben Randhol
  2 siblings, 0 replies; 22+ messages in thread
From: Jeffrey Carter @ 2002-01-28 22:21 UTC (permalink / raw)


Christoph & Ursula Grein wrote:
> 
> > I could not find an Ada implementation of MT19937 pseudo random number
> > generator by searching CLA.
> 
> Is this what you are looking for?
> 
>   --                   Random Number Generator
>   --
>   -- The algorithm was developed by George Marsaglia,
>   -- Supercomputer Computations Research Institute,
>   -- Florida State University
>   -- (ref. to Ada LETTERS, Volume VIII, Number2, March/April 1988).
> 
> I've an implementation together with a test driver. It produces the prescribed
> result.
> Whoever is interested I will send.

No that's Marsaglia's Universal random number generator, a different
algorithm than MT19937. An implementation of Marsaglia's Universal
generator is also part of the PragmAda Reusable Components.

> > Thought someone might be interested to use MT19937. You can download
> > the source from my web site at http://greenlime.com/users/adrian.hoe

Note that Hoe's implementation is released under the GPL, not the GMGPL:
any program that uses it is also under the GPL.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28 20:00 ` Christoph & Ursula Grein
  2002-01-28 22:21   ` Jeffrey Carter
@ 2002-01-28 23:34   ` Hugo Pfoertner
  2002-01-29  1:54     ` Adrian Hoe
  2002-01-29  0:08   ` Preben Randhol
  2 siblings, 1 reply; 22+ messages in thread
From: Hugo Pfoertner @ 2002-01-28 23:34 UTC (permalink / raw)


There was a discussion in the sci.math NG on pseudo random numbers in
Ada in September 2001, which might be of some interest in this context:
Search on Google Groups:
http://groups.google.com/groups?q=%2Brandom+%2Bgeneration+%2Bsachi&hl=en
and select the thread
Re: basic random number generating methods

Adrian: Is the recent update (mt19937ar.c) dated 2002/01/26 already
considered in your port? If not, are you planning to include it? 


Hugo Pfoertner

Christoph & Ursula Grein wrote:
> 
> > From: byhoe@greenlime.com
> > To: comp.lang.ada@ada.eu.org
> > Subject: Ada implementation of Mersenne Twister (MT19937)
> > Date: 28 Jan 2002 00:43:35 -0800
> >
> > Hello,
> >
> > I could not find an Ada implementation of MT19937 pseudo random number
> > generator by searching CLA.
> 
> Is this what you are looking for?
> 
>   --                   Random Number Generator
>   --
>   -- The algorithm was developed by George Marsaglia,
>   -- Supercomputer Computations Research Institute,
>   -- Florida State University
>   -- (ref. to Ada LETTERS, Volume VIII, Number2, March/April 1988).
> 
> I've an implementation together with a test driver. It produces the prescribed
> result.
> Whoever is interested I will send.
> 
> > So, I decided to port Makoto Matsumoto and
> > Takuji Nishimura's work to Ada.
> >
> > Thought someone might be interested to use MT19937. You can download
> > the source from my web site at http://greenlime.com/users/adrian.hoe
> 
> Didn't have yet a look at the above...
> 
> >
> >                               -- Adrian Hoe
> >                               -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28 20:00 ` Christoph & Ursula Grein
  2002-01-28 22:21   ` Jeffrey Carter
  2002-01-28 23:34   ` Hugo Pfoertner
@ 2002-01-29  0:08   ` Preben Randhol
  2002-01-29 11:24     ` HP
  2 siblings, 1 reply; 22+ messages in thread
From: Preben Randhol @ 2002-01-29  0:08 UTC (permalink / raw)


On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
> I've an implementation together with a test driver. It produces the
> prescribed result.  Whoever is interested I will send.

A random number generator that produces the prescribed result doesn't
sound very good ;-)

-- 
Preben Randhol         �For me, Ada95 puts back the joy in programming.�



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28 23:34   ` Hugo Pfoertner
@ 2002-01-29  1:54     ` Adrian Hoe
  0 siblings, 0 replies; 22+ messages in thread
From: Adrian Hoe @ 2002-01-29  1:54 UTC (permalink / raw)


Hugo Pfoertner wrote:
> 
> There was a discussion in the sci.math NG on pseudo random numbers in
> Ada in September 2001, which might be of some interest in this context:
> Search on Google Groups:
> http://groups.google.com/groups?q=%2Brandom+%2Bgeneration+%2Bsachi&hl=en
> and select the thread
> Re: basic random number generating methods

Sounds interesting on the G.2.5.


> Adrian: Is the recent update (mt19937ar.c) dated 2002/01/26 already
> considered in your port? If not, are you planning to include it?


I am already working on the mt19937ar.c and should be released within
this week.

> Hugo Pfoertner

-- 
                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
@ 2002-01-29  6:55 Christoph Grein
  2002-01-29 11:04 ` Georg Bauhaus
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Christoph Grein @ 2002-01-29  6:55 UTC (permalink / raw)


> From: Preben Randhol <randhol+abuse@pvv.org>
> 
> On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
> > I've an implementation together with a test driver. It produces the
> > prescribed result.  Whoever is interested I will send.
> 
> A random number generator that produces the prescribed result doesn't
> sound very good ;-)

I see your smiley on this, but seriously, you can get unpredictable random 
numbers only from physical devices like radioactive decay etc.

> 
> -- 
> Preben Randhol         «For me, Ada95 puts back the joy in programming.»
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29  6:55 Christoph Grein
@ 2002-01-29 11:04 ` Georg Bauhaus
  2002-01-29 15:27   ` HP
  2002-01-29 16:51 ` Jeffrey Carter
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 22+ messages in thread
From: Georg Bauhaus @ 2002-01-29 11:04 UTC (permalink / raw)


Christoph Grein <christoph.grein@eurocopter.com> wrote:
 
: I see your smiley on this, but seriously, you can get unpredictable random 
: numbers only from physical devices like radioactive decay etc.

also from one of my friend's foolish but talented dogs
that stumbles over the keyboards every now and then.
Although, I'm afraid, that's only a fraction of numbers per second.

- georg



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29  0:08   ` Preben Randhol
@ 2002-01-29 11:24     ` HP
  0 siblings, 0 replies; 22+ messages in thread
From: HP @ 2002-01-29 11:24 UTC (permalink / raw)


Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrna5bq37.pn.randhol+abuse@kiuk0156.chembio.ntnu.no>...
> On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
> > I've an implementation together with a test driver. It produces the
> > prescribed result.  Whoever is interested I will send.
> 
> A random number generator that produces the prescribed result doesn't
> sound very good ;-)

Makoto Matsumoto provides a result file mt19937ar.out of his C version
as a reference. From readme-mt.txt:

4. The outputs
The output of the mt19937ar.c is in the file mt19937ar.out.
If you revise or translate the code, check the output
by using this file.

The usability of the mt port would be significantly improved if it
included the
functionalities for
Saving/Restoring the internal state of the mt PRNG using something
like the Save, Reset procedure and the Image and Value functions
defined in AARM A.5.2 (Random Number Generation:
http://ada-auth.org/~acats/arm-html/AA-A-5-2.html )

Regards
Hugo Pfoertner



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29 11:04 ` Georg Bauhaus
@ 2002-01-29 15:27   ` HP
  0 siblings, 0 replies; 22+ messages in thread
From: HP @ 2002-01-29 15:27 UTC (permalink / raw)


Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de> wrote in message news:<a35vj8$nd$1@a1-hrz.uni-duisburg.de>...
> Christoph Grein <christoph.grein@eurocopter.com> wrote:
>  
> : I see your smiley on this, but seriously, you can get unpredictable random 
> : numbers only from physical devices like radioactive decay etc.
> 
> also from one of my friend's foolish but talented dogs
> that stumbles over the keyboards every now and then.
> Although, I'm afraid, that's only a fraction of numbers per second.
> 
> - georg

A comprehensive list on this topic can be found at:
http://www.cs.berkeley.edu/~daw/rnd/

Hugo



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29  6:55 Christoph Grein
  2002-01-29 11:04 ` Georg Bauhaus
@ 2002-01-29 16:51 ` Jeffrey Carter
  2002-01-29 22:34   ` Ted Dennison
  2002-01-30 13:00 ` HP
  2002-01-31  8:15 ` Bobby D. Bryant
  3 siblings, 1 reply; 22+ messages in thread
From: Jeffrey Carter @ 2002-01-29 16:51 UTC (permalink / raw)


Christoph Grein wrote:
> 
> > A random number generator that produces the prescribed result doesn't
> > sound very good ;-)
> 
> I see your smiley on this, but seriously, you can get unpredictable random
> numbers only from physical devices like radioactive decay etc.

SGI has a system that uses digital images of lava lamps to generate
random numbers. A quick Google search should find suitable references.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29 16:51 ` Jeffrey Carter
@ 2002-01-29 22:34   ` Ted Dennison
  2002-01-30 16:21     ` Stephen Leake
  0 siblings, 1 reply; 22+ messages in thread
From: Ted Dennison @ 2002-01-29 22:34 UTC (permalink / raw)


Jeffrey Carter <jeffrey.carter@boeing.com> wrote in message news:<3C56D315.85771A75@boeing.com>...

> SGI has a system that uses digital images of lava lamps to generate
> random numbers. A quick Google search should find suitable references.

This seemed to silly to be true, so I tried it. Its true.
( http://www.yak.net/fqa/267.html )

...{shakes head sadly}



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29  6:55 Christoph Grein
  2002-01-29 11:04 ` Georg Bauhaus
  2002-01-29 16:51 ` Jeffrey Carter
@ 2002-01-30 13:00 ` HP
  2002-01-30 18:24   ` Ted Dennison
  2002-01-31  8:15 ` Bobby D. Bryant
  3 siblings, 1 reply; 22+ messages in thread
From: HP @ 2002-01-30 13:00 UTC (permalink / raw)


Christoph Grein <christoph.grein@eurocopter.com> wrote in message news:<mailman.1012287362.30277.comp.lang.ada@ada.eu.org>...
> > From: Preben Randhol <randhol+abuse@pvv.org>
> > 
> > On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
> > > I've an implementation together with a test driver. It produces the
> > > prescribed result.  Whoever is interested I will send.
> > 
> > A random number generator that produces the prescribed result doesn't
> > sound very good ;-)
> 
> I see your smiley on this, but seriously, you can get unpredictable 
> random 
> numbers only from physical devices like radioactive decay etc.

Did anyone try to access something like the INTEL Random Number Generator
http://www.cryptography.com/intelRNG.pdf
 or the ComScire PCQNG true RNG
http://comscire.com/
 from an Ada Program?

Hugo Pfoertner



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29 22:34   ` Ted Dennison
@ 2002-01-30 16:21     ` Stephen Leake
  2002-01-30 22:58       ` Jeffrey Carter
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Leake @ 2002-01-30 16:21 UTC (permalink / raw)


dennison@telepath.com (Ted Dennison) writes:

> Jeffrey Carter <jeffrey.carter@boeing.com> wrote in message
> news:<3C56D315.85771A75@boeing.com>...
> 
> > SGI has a system that uses digital images of lava lamps to generate
> > random numbers. A quick Google search should find suitable references.
> 
> This seemed to silly to be true, so I tried it. Its true.
> ( http://www.yak.net/fqa/267.html )
> 
> ...{shakes head sadly}

Hmm. Did you actually click on the LAVARAND link? That timed out for
me. So this is still an uban legend in my book.

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-30 13:00 ` HP
@ 2002-01-30 18:24   ` Ted Dennison
  2002-01-30 23:04     ` Hugo Pfoertner
  0 siblings, 1 reply; 22+ messages in thread
From: Ted Dennison @ 2002-01-30 18:24 UTC (permalink / raw)


yae9911@netscape.net (HP) wrote in message news:<89c716bb.0201300500.5091f5af@posting.google.com>...
> Did anyone try to access something like the INTEL Random Number Generator
> http://www.cryptography.com/intelRNG.pdf
>  or the ComScire PCQNG true RNG
> http://comscire.com/
>  from an Ada Program?

It wouldn't be too tough to make an Ada/AWS program that retrieves
random numbers from HotBits ( http://www.fourmilab.ch/hotbits/ )

-- 
T.E.D. 
Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
Homepage -  http://www.telepath.com/dennison/Ted/TED.html



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-30 16:21     ` Stephen Leake
@ 2002-01-30 22:58       ` Jeffrey Carter
  0 siblings, 0 replies; 22+ messages in thread
From: Jeffrey Carter @ 2002-01-30 22:58 UTC (permalink / raw)


Stephen Leake wrote:
> 
> dennison@telepath.com (Ted Dennison) writes:
> 
> > Jeffrey Carter <jeffrey.carter@boeing.com> wrote in message
> > news:<3C56D315.85771A75@boeing.com>...
> >
> > > SGI has a system that uses digital images of lava lamps to generate
> > > random numbers. A quick Google search should find suitable references.
> >
> > This seemed to silly to be true, so I tried it. Its true.
> > ( http://www.yak.net/fqa/267.html )
> >
> > ...{shakes head sadly}
> 
> Hmm. Did you actually click on the LAVARAND link? That timed out for
> me. So this is still an uban legend in my book.

Hmm. When I first saw this, it was on an SGI web page. I'm not sure
what's going on now. You can see Google's cache of the page at

http://www.google.com/search?q=cache:ejmaLzpX6zwC:www.lavarnd.org/+sgi+lava+lite++%22random+number%22&hl=en&lr=lang_en

(that link may have wrapped on your newsreader). If it is a legend, it
seems to have fooled some major hitters: Science News

http://www.sciencenews.org/20010512/mathtrek.asp

American Cynic

http://www.google.com/search?q=cache:-AaDJEpuH64C:www.americancynic.com/07152001.html+sgi+lava+lite++%22random+number%22&hl=en&lr=lang_en

(that link may have wrapped on your newsreader).

IBM

http://www-106.ibm.com/developerworks/security/library/beating.html?dwzone=security

MicroSoft

http://www.microsoft.com/mind/0797/flux0797.htm

American Scientist

http://www.sigmaxi.org/amsci/Issues/Comsci01/Compsci2001-07.html

Trinity College

http://www.random.org/report/Report.pdf

Drexel University

http://mathforum.org/library/more_info.html?id=5504

and the US Armed Forces

http://www.armedforces.net/search/Computers/Algorithms/Pseudorandom_Numbers/index.shtml

So, if argument from authority influences you, consider yourself
influenced.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-30 18:24   ` Ted Dennison
@ 2002-01-30 23:04     ` Hugo Pfoertner
  0 siblings, 0 replies; 22+ messages in thread
From: Hugo Pfoertner @ 2002-01-30 23:04 UTC (permalink / raw)


Nice joke; my question was not about a web access to John Walkers's
HotBits server, but rather about an interface to Intel's Security
Driver. See:
http://developer.intel.com/design/software/drivers/platform/security.htm

Hugo

(BTW: SGI's Lava Lamp really seems to be broken)

Ted Dennison schrieb:
> 
> yae9911@netscape.net (HP) wrote in message news:<89c716bb.0201300500.5091f5af@posting.google.com>...
> > Did anyone try to access something like the INTEL Random Number Generator
> > http://www.cryptography.com/intelRNG.pdf
> >  or the ComScire PCQNG true RNG
> > http://comscire.com/
> >  from an Ada Program?
> 
> It wouldn't be too tough to make an Ada/AWS program that retrieves
> random numbers from HotBits ( http://www.fourmilab.ch/hotbits/ )
> 
> --
> T.E.D.
> Home     -  mailto:dennison@telepath.com (Yahoo: Ted_Dennison)
> Homepage -  http://www.telepath.com/dennison/Ted/TED.html



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28  8:43 Ada implementation of Mersenne Twister (MT19937) Adrian Hoe
@ 2002-01-31  6:43 ` Bobby D. Bryant
  2002-01-31  8:22 ` Bobby D. Bryant
  2002-02-02  2:28 ` Adrian Hoe
  2 siblings, 0 replies; 22+ messages in thread
From: Bobby D. Bryant @ 2002-01-31  6:43 UTC (permalink / raw)


On Mon, 28 Jan 2002 02:43:35 -0600, Adrian Hoe wrote:

> I could not find an Ada implementation of MT19937 pseudo random number
> generator by searching CLA. So, I decided to port Makoto Matsumoto and
> Takuji Nishimura's work to Ada.
> 
> Thought someone might be interested to use MT19937. You can download
> the source from my web site at http://greenlime.com/users/adrian.hoe

Thanks.  I've been needing this for my research, but it never seemed to
boil up to the top of my to-do list.

Bobby Bryant
Austin, Texas



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-29  6:55 Christoph Grein
                   ` (2 preceding siblings ...)
  2002-01-30 13:00 ` HP
@ 2002-01-31  8:15 ` Bobby D. Bryant
  2002-02-01  3:42   ` Adrian Hoe
  3 siblings, 1 reply; 22+ messages in thread
From: Bobby D. Bryant @ 2002-01-31  8:15 UTC (permalink / raw)


On Tue, 29 Jan 2002 00:55:00 -0600, Christoph Grein wrote:

>> From: Preben Randhol <randhol+abuse@pvv.org>
>> 
>> On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
>> > I've an implementation together with a test driver. It produces the
>> > prescribed result.  Whoever is interested I will send.
>> 
>> A random number generator that produces the prescribed result doesn't
>> sound very good ;-)
> 
> I see your smiley on this, but seriously, you can get unpredictable
> random numbers only from physical devices like radioactive decay etc.

FWIW, sometimes in simulation work it's important to be able to get the
same sequence of pseudo-random numbers all over again.

Bobby Bryant
Austin, Texas



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28  8:43 Ada implementation of Mersenne Twister (MT19937) Adrian Hoe
  2002-01-31  6:43 ` Bobby D. Bryant
@ 2002-01-31  8:22 ` Bobby D. Bryant
  2002-02-02  2:28 ` Adrian Hoe
  2 siblings, 0 replies; 22+ messages in thread
From: Bobby D. Bryant @ 2002-01-31  8:22 UTC (permalink / raw)


On Mon, 28 Jan 2002 02:43:35 -0600, Adrian Hoe wrote:

> I could not find an Ada implementation of MT19937 pseudo random number
> generator by searching CLA. So, I decided to port Makoto Matsumoto and
> Takuji Nishimura's work to Ada.
> 
> Thought someone might be interested to use MT19937. You can download
> the source from my web site at http://greenlime.com/users/adrian.hoe

How hard would it be to make it support multiple independent generators
the way the built-ins do?

Sometimes I use one seed for a simulator and a different seed for the AI
solver; this lets me repeat the simulator's behavior exactly while using
different seeds on the solver end for cross-validation.

Thanks,

Bobby Bryant
Austin, Texas



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-31  8:15 ` Bobby D. Bryant
@ 2002-02-01  3:42   ` Adrian Hoe
  0 siblings, 0 replies; 22+ messages in thread
From: Adrian Hoe @ 2002-02-01  3:42 UTC (permalink / raw)


"Bobby D. Bryant" wrote:
> 
> On Tue, 29 Jan 2002 00:55:00 -0600, Christoph Grein wrote:
> 
> >> From: Preben Randhol <randhol+abuse@pvv.org>
> >>
> >> On Mon, 28 Jan 2002 21:00:25 +0100, Christoph & Ursula Grein wrote:
> >> > I've an implementation together with a test driver. It produces the
> >> > prescribed result.  Whoever is interested I will send.
> >>
> >> A random number generator that produces the prescribed result doesn't
> >> sound very good ;-)
> >
> > I see your smiley on this, but seriously, you can get unpredictable
> > random numbers only from physical devices like radioactive decay etc.
> 
> FWIW, sometimes in simulation work it's important to be able to get the
> same sequence of pseudo-random numbers all over again.


Yes. I the same sequence again for testing simulated annealing algorithm
which is used in one of my company research project. This research
project would add benefits to our ERP software for furniture industry to
help solve traveling salesmen problems.
-- 
                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Ada implementation of Mersenne Twister (MT19937)
  2002-01-28  8:43 Ada implementation of Mersenne Twister (MT19937) Adrian Hoe
  2002-01-31  6:43 ` Bobby D. Bryant
  2002-01-31  8:22 ` Bobby D. Bryant
@ 2002-02-02  2:28 ` Adrian Hoe
  2 siblings, 0 replies; 22+ messages in thread
From: Adrian Hoe @ 2002-02-02  2:28 UTC (permalink / raw)


Adrian Hoe wrote:
> 
> Hello,
> 
> I could not find an Ada implementation of MT19937 pseudo random number
> generator by searching CLA. So, I decided to port Makoto Matsumoto and
> Takuji Nishimura's work to Ada.
> 
> Thought someone might be interested to use MT19937. You can download
> the source from my web site at http://greenlime.com/users/adrian.hoe


Something interesting I found in Ada's while-loop and for-loop. I don't
know if this have been discussed in CLA because I could not find
anything related by searching with Google.

My implementation of test3.adb uses while..loop (you can download
adamt19937 source from my home page) and Christoph modified the while
loop to a for..loop.

The time recorded on my Linux machine using my implementation
(while..loop) is 57seconds. But using Christoph for..loop, I recorded
107seconds on my same Linux machine (Christoph recorded 116seconds on
WIndows98).

It seems like for..loop is slower than while..loop. I did not realize
the difference between them until I tested Christoph's test3. I thought
it was WIndows98 problem.

Any discussion?
-- 
                              -- Adrian Hoe
                              -- http://greenlime.com/users/adrian.hoe



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2002-02-02  2:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-28  8:43 Ada implementation of Mersenne Twister (MT19937) Adrian Hoe
2002-01-31  6:43 ` Bobby D. Bryant
2002-01-31  8:22 ` Bobby D. Bryant
2002-02-02  2:28 ` Adrian Hoe
     [not found] <200201281013.LAA04729@bulgaria.otn.eurocopter.de>
2002-01-28 20:00 ` Christoph & Ursula Grein
2002-01-28 22:21   ` Jeffrey Carter
2002-01-28 23:34   ` Hugo Pfoertner
2002-01-29  1:54     ` Adrian Hoe
2002-01-29  0:08   ` Preben Randhol
2002-01-29 11:24     ` HP
  -- strict thread matches above, loose matches on Subject: below --
2002-01-29  6:55 Christoph Grein
2002-01-29 11:04 ` Georg Bauhaus
2002-01-29 15:27   ` HP
2002-01-29 16:51 ` Jeffrey Carter
2002-01-29 22:34   ` Ted Dennison
2002-01-30 16:21     ` Stephen Leake
2002-01-30 22:58       ` Jeffrey Carter
2002-01-30 13:00 ` HP
2002-01-30 18:24   ` Ted Dennison
2002-01-30 23:04     ` Hugo Pfoertner
2002-01-31  8:15 ` Bobby D. Bryant
2002-02-01  3:42   ` Adrian Hoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox