Welcome
Welcome to <strong>SunUO</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!

Pseudo-random number generator

All languages, ask and maybe someone can help.

Pseudo-random number generator

Postby BlueAngel on Thu Mar 06, 2008 9:47 pm

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
"A spell, once casted, can be undone. But a secret, once revealed, can never again be kept."
BlueAngel
 
Posts: 61
Joined: Wed Sep 12, 2007 2:47 pm
Location: Italy

Postby AxelDominatoR on Thu Mar 20, 2008 11:08 pm

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
AxelDominatoR
 
Posts: 1
Joined: Thu Mar 20, 2008 10:44 pm

Postby BlueAngel on Wed Mar 26, 2008 6:20 pm

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.
"A spell, once casted, can be undone. But a secret, once revealed, can never again be kept."
BlueAngel
 
Posts: 61
Joined: Wed Sep 12, 2007 2:47 pm
Location: Italy


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron