View previous topic :: View next topic |
Author |
Message |
Ax3l Cheater
Reputation: 1
Joined: 22 May 2011 Posts: 37
|
Posted: Sun May 22, 2011 2:44 pm Post subject: What if ? |
|
|
What if you have 2 computers that are both the same and bought on the same date and manufactured on the same date,...
Will the random be the same?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Sun May 22, 2011 3:47 pm Post subject: |
|
|
no it won't. the random tends not to be seeded by any sort of hardware guid. it is usually seeded by more 'random' things such as current time or in some extreme cases external factors such as atmosphere radiation, etc. most random functions work by being seeded by something related to time however
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun May 22, 2011 3:55 pm Post subject: |
|
|
pretty sure the standard dictates 1 as the default seed, for what it's worth.
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 204
Joined: 25 Jan 2006 Posts: 8579 Location: 127.0.0.1
|
Posted: Mon May 23, 2011 9:01 am Post subject: Re: What if ? |
|
|
Ax3l wrote: | What if you have 2 computers that are both the same and bought on the same date and manufactured on the same date,...
Will the random be the same? |
Best of luck to you to have this ever happen though lol. The probability that this would ever happen with two computers would be pretty huge.
_________________
- Retired. |
|
Back to top |
|
 |
Ax3l Cheater
Reputation: 1
Joined: 22 May 2011 Posts: 37
|
Posted: Mon May 23, 2011 12:37 pm Post subject: |
|
|
Yes but the time , place, ip , windows serial or something and all of these are the same( just imagine if ) Will it be the same ?
BTW , I'm new here , is there an "introduction" forum or something ?
|
|
Back to top |
|
 |
Radiation Grandmaster Cheater
Reputation: 14
Joined: 17 Jun 2009 Posts: 842 Location: Chernobyl
|
Posted: Mon May 23, 2011 6:08 pm Post subject: |
|
|
interesting question. i think there will be slight differences, but the only way to know is to actually test it out.
_________________
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon May 23, 2011 7:30 pm Post subject: |
|
|
depends on the implementation of the generator and the seed.
assuming the same exact implementation of a (keyword) pseudo random number generator and the same seed, the end result will probably be the same.
|
|
Back to top |
|
 |
Ax3l Cheater
Reputation: 1
Joined: 22 May 2011 Posts: 37
|
Posted: Tue May 24, 2011 9:53 am Post subject: |
|
|
I'm wondering how the algorithm( is it actually an algorithm or is it a set of instructions ?) of the cmath library works.
Do all libraries use the same way to generate randoms ?
|
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue May 24, 2011 3:16 pm Post subject: |
|
|
Ax3l wrote: | I'm wondering how the algorithm( is it actually an algorithm or is it a set of instructions ?) of the cmath library works.
Do all libraries use the same way to generate randoms ? |
it's probably somewhat different across all libraries.
|
|
Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sat May 28, 2011 1:43 am Post subject: |
|
|
Ax3l wrote: | Do all libraries use the same way to generate randoms ? | Yeah, they're different. The standard doesn't require any specific implementation of srand or rand.
See some implementations here: http://www.cse.yorku.ca/~oz/marsaglia-rng.html
|
|
Back to top |
|
 |
|