Page 1 of 1

Pseudo-random number generator

PostPosted: Thu Mar 06, 2008 9:47 pm
by BlueAngel
Hi again,
it seems this will be the first post in this section. Wow.

As in the subject I wish to talk about the generation of random number, as many of you know generation of random numbers is important but also very hard.
Going around in internet I've encountered an interesting algorithm: the Mersenne Twister made by prof. Makoto Matsumoto of the Hiroshima University.

Understading the algorithm give me a headache but I've made an implementation by myself and the algorithm produced very good random numbers and also is quite fast.
I needed an algorithm such this one because I wish to made some test with a popular card-game: Magic: The Gathering and I'm working to a computer program similar to Magic Workstation but for Linux.

I wish to know for your experience if you know more pseudo-random number generator algorithms and which one you consider a good one.
Please do not just say Math.random(), it's too poor.
Bye

PostPosted: Thu Mar 20, 2008 11:08 pm
by AxelDominatoR
Wow, I love Magic! :D

Ok, so the MT algorithm is one of the best around here, but you may look at these two, too.
Fortuna at Wikipedia
Blum Blum Shub at Wikipedia

MT may be really fast if used in its SIMD Fast variant, too.
I like the Fortuna's "entropy pool" idea, tough.

Do you have a project page for your Magic-inspired software? It's an interesting project!

Axel DominatoR ^^^ HC

PostPosted: Wed Mar 26, 2008 6:20 pm
by BlueAngel
Thank you for the reply.

Both algorithms looks good anyway I should test both of them in practice, they may be good for criptography but maybe not for a Magic deck.

No, actually I have not a page of this project, I've many other projects to finish before this one.