
-----------------------------------
StealthArcher
Fri Feb 23, 2007 3:18 pm

How to make an RNG
-----------------------------------
Are there specific types?

Is ythere a specific lnguage that is best?

How would you code it anyway?

-----------------------------------
klopyrev
Fri Feb 23, 2007 4:28 pm

Re: How to make an RNG
-----------------------------------
If by RNG, you mean Random Number Generator, you might want to consider looking at The Art of Computer Programming, Volume 2 by Donald Knuth. The entire third chapter is dedicated into Random Numbers. Some of the ones studied there are the linear congruential method (Xn+1 = (aXn + c) mod m), which is the most common type in programming languages. Also, Lagged Fibonacci generator, Mersenne twister, etc. Look at the book or even here:
http://en.wikipedia.org/wiki/List_of_random_number_generators

As for the language, I am not an expert, but I don't think it matters too much.

Coding the RNG is also, pretty simple. It really depends on which generator you want to use.

Konstantin Lopyrev

-----------------------------------
wtd
Fri Feb 23, 2007 4:33 pm

RE:How to make an RNG
-----------------------------------
Any language which can generate a random number, and which can loop.  It's a very small list.

Oh, and presumably you'd use a computer to code it.

-----------------------------------
klopyrev
Fri Feb 23, 2007 4:36 pm

Re: How to make an RNG
-----------------------------------
lol, nice answer!
