Zelaron Gaming Forum

Zelaron Gaming Forum (http://zelaron.com/forum/index.php)
-   General Discussion (http://zelaron.com/forum/forumdisplay.php?f=182)
-   -   random numbers (http://zelaron.com/forum/showthread.php?t=10051)

LordZpider 2002-11-09 11:10 PM

random numbers
 
anyone know how something that suppose to take commands and act on those commands, a computer, GENERATE a random numbers?

Adrenachrome 2002-11-09 11:13 PM

HUH?!

tacoX 2002-11-09 11:55 PM

Rephrase please =/

DKWicked 2002-11-10 12:25 AM

Quote:

Originally posted by LordZpider
anyone know how something that suppose to take commands and act on those commands, a computer, GENERATE a random numbers?
anyone know how something that is suppose to take commands and act on those commands, ie a computer, GENERATE a sequence of random numbers?

I think thats the idea

no, I dont know

Shpook 2002-11-10 12:40 AM

i think he's asking how something with a set formula and set parameters can prduce something completely random. Well, to the best of my knowlege, its not completely random. there are set parameters(orguidlines i guess u could say) and them a value or figure is selected within those parameters. sort of like rolling a pair of dice, you can never go higher than 12 or lower than 2, but anything in between is random. in a way its still controlled though, because you have to tell yourself to roll the dice.

I hope that was a good analogy, and i hope i was correct and helped you out.

Randuin 2002-11-10 01:37 AM

it's... RANDOMIZE!! yes random ness is good

LordZpider 2002-11-10 11:48 AM

What i'm trying to say is simply, how do computers generate random numbers?

and i know there are set parameters. but for example, i tell me calculator de create random intergers, and it just start spitting out random numbers, no patterns... just RANDOM... where do these numbers come from?!

Rurouni Storm 2002-11-10 08:43 PM

Quote:

Originally posted by LordZpider
What i'm trying to say is simply, how do computers generate random numbers?

and i know there are set parameters. but for example, i tell me calculator de create random intergers, and it just start spitting out random numbers, no patterns... just RANDOM... where do these numbers come from?!

They actually come from a formula that's fed from a small clock. That way, the number doesn't stay the same and is random enough for your purposes.

LordZpider 2002-11-11 12:23 AM

yea, can u be a bit more specific please

Rurouni Storm 2002-11-11 09:16 AM

A long read

The C++ command for generation

I can't find the actual formulas these functions use as they are copyrighted and kept secret by their creators.

WetWired 2002-11-11 11:27 AM

I assume there is a random number generator someplace in Linux, right? Happy hunting :p

LordZpider 2002-11-11 11:30 AM

that says nothing, the command is telling C++ to generate a random number, but not actually calculating one.

let's say,

printf ("A number between 0 and 99: %d\n", rand()%100);

and the ouput is 46

where did that 46 come from? no one seems to understand my question. But i think i should have just left it alone after the small clock theory, cuz that's probably as accurate as it will get

WetWired 2002-11-11 11:33 AM

IIRC Linux has a random number generator proccess that is accessed by other programs. Also, you can get open source standard libraries for at least the Linux platform, which should either include a random number generator, or a call to the afforementioned.

Adrenachrome 2002-11-11 12:11 PM

I have a random number generator its my left and right hands!

573457123762827359 random as hell number!!!!!!

Jamesadin 2002-11-11 12:13 PM

That works!

Hades-Knight 2002-11-11 12:15 PM

hres mine



18648746894543454365438674863

BlueCube 2002-11-11 01:06 PM

I know it's a process that has to be seeded... if you use the same seed number, you'll keep getting the same "random" numbers in a sequence. You're right, it's usually the number of seconds elapsed since midnight that's used as the seed number.

RANDOMIZE TIMER

WetWired 2002-11-11 01:30 PM

Actually, it's the number of seconds since midnight or reset, whichever is more recent :p

LordZpider 2002-11-11 02:59 PM

so what if u generate 2 random numbers at the same time?

Rurouni Storm 2002-11-11 03:17 PM

They still won't be generated at the exact same time. A computer cannot do that. It still only processes a single 1 or 0 at a given time.

The time when it reaches the second number will be slightly different, probably enough to make it different. However, if you had two comps running simultaneously at the exact same time, you could get the same number.


All times are GMT -6. The time now is 11:36 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.