Random number generator
-
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
-
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
Most use time and try to obfuscate it beyond recognition with formulas...no idea if there's a "standard" formula for it though. Use "include ctime" and use srand(time()) . (Just search for random number generator in google and you can probably find source code for one...) If you're trying to figure out how to cheat at poker games you'll have to figure out what formula they're using :laugh: .
modified on Thursday, July 10, 2008 4:11 PM
-
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
There is an infinite number of random number generators. And I don't mean aleph-null infinite, but much more! Of course some could be more popular than others, but you figuring out which RNG is behind a particular game site is, well, rather improbable. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|
-
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
Its likely that a sensible poker site of any size would be using the cryptographically strong RNG. You've got just about zero hope of predicting that, as (at least the windows one is) its based on an entropy pool setup. Its possible that the bigger sites use a hardware RNG as well. (Not that I think there's a good reason beyond it being cool) ;)
Mark Churchill Director Dunn & Churchill Free Download:
Diamond Binding: The simple, powerful, reliable, and effective data layer toolkit for Visual Studio. -
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
-
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use Thanks!
this might look silly but i ve created a simple "random numbers generator" based on the DateTime class
double time = DateTime.Now.Millisecond;
double randomnumber = time / 1000;
Console.WriteLine("random is :{0}",randomnumber.ToString());what do u think pretty strong huh ?? ;P
-
this might look silly but i ve created a simple "random numbers generator" based on the DateTime class
double time = DateTime.Now.Millisecond;
double randomnumber = time / 1000;
Console.WriteLine("random is :{0}",randomnumber.ToString());what do u think pretty strong huh ?? ;P
Good enough for some purposes... I suppose. :~
-
Good enough for some purposes... I suppose. :~
Well it is :p
-
Well it is :p
Then at least eliminate a step:
double time = DateTime.Now.Millisecond / 1000**.0** ;