Welcome To P8ntballer.com
The Home Of European Paintball
Sign Up & Join In

Is anything Random?

JWarren

www.khayos.co.uk
Mar 11, 2009
105
0
0
Billingham/Teeside
www.khayos.co.uk
I always think about this one. You hear about programs on computers that pick a "random" number for bingo example. But is this number random? The computer work by understanding boundaries, rules and orders if you will. It must choose a code. It's hard to explain this one. But I hope Robbo or someone else can try and understand what I mean and put it into better context.
 

Codiak

GWC 2010 #23
Dec 2, 2004
1,110
15
63
Newcastle
www.codiak.co.uk
I always think about this one. You hear about programs on computers that pick a "random" number for bingo example. But is this number random? The computer work by understanding boundaries, rules and orders if you will. It must choose a code. It's hard to explain this one. But I hope Robbo or someone else can try and understand what I mean and put it into better context.
computers can be coded to pick a "random" number between set boundaries e.g a number between 1 and 100.
 

Robbo

Owner of this website
Jul 5, 2001
13,114
2,157
448
London
www.p8ntballer.com
I'm afraid computers cannot pick random numbers in the definitive sense of the word 'random'.
The computer's choice will always be hostage to its program and therefore not random.
 
computers can be coded to pick a "random" number between set boundaries e.g a number between 1 and 100.
A computer on its own, is never random. NEVER!

If you picked those numbers a billion times, certain numbers would come out more than others and the nature of the 'random' algorithm would come unravveled.


The most common randomisation technique uses human input.
Such as mouse movements, which provide the numbers going into the algorithm (the seed).
A random seed can produce a random result.


Other ways in electronics to produce randomness is using noise.
Noise is a product of many things, including radio waves emmitted from the big bang. So its quite reliably random.

Noise produced by some semiconductors is random on a quantum level.

So with a random seed a computer can be random.
 

Codiak

GWC 2010 #23
Dec 2, 2004
1,110
15
63
Newcastle
www.codiak.co.uk
Well the way lecturers explained it in a programming lesson that pre-defining the range for a random number to be generated from a range, I guess when using a particular programming language the "random" generator must be called from a library and as you say the rules of which are pre-defined by a human.
 
Well the way lecturers explained it in a programming lesson that pre-defining the range for a random number to be generated from a range, I guess when using a particular programming language the "random" generator must be called from a library and as you say the rules of which are pre-defined by a human.

Yes thats the correct way to use it. Your just specifying a range for the numbers to randomly fall within.
Your computer wouldnt be very happy if you asked it to produce a random number between 0 and infinity.



The random numbers are generated using simple recursive alogorithms. Nothing complex at all.

But computers have a knack of reacting the same way to the same situation every single time.
So to make it random you need to introduce some chaos from us random humans. Thats called a seed.

Many random generators capture mouse movements as the seed.

You can look at Unix Rand() and Srand() manual pages for plenty of great info.
 

Robbo

Owner of this website
Jul 5, 2001
13,114
2,157
448
London
www.p8ntballer.com
I always think about this one. You hear about programs on computers that pick a "random" number for bingo example. But is this number random? The computer work by understanding boundaries, rules and orders if you will. It must choose a code. It's hard to explain this one. But I hope Robbo or someone else can try and understand what I mean and put it into better context.

Women are random, their minds work on the quantum level, and no, I ain't referring to their IQ.
I have yet to fathom just what rationale their minds employ coz sure as sh!t, it doesn't have the letters, 'g i o l c' involved :eek:
 

Tom

Tom
Nov 27, 2006
4,076
1,210
198
Salisbury
www.TaskForceDelta.co.uk
On computers 'normal' random numbers are selected from a predefined 'random' series between 0 and 1 to a large number of decimal places. Therefore by specifying a range these can be translated to whole numbers from 1 to 100, etc.

If you don't understand random sequences you can produce an appilcation that always draws teh same random numbers.

To stop you from getting the same 'random' numbers all of the time you can set the 'seed' which moves the start point in the sequence. An advantage of this 'seed' method is you can go back and recreate the identical random sequence for eperiments or testing.

A good start to picking random numbers is to reset the seed based on the current time down to millisenconds.

If you are simulating a dice then you always want a number between 1 and 6, and can have the same number twice in a row. Computer sequences can be bad at simulating dice as the predefined sequence could get doubles but is less likely to get the same number in a row then real dice.

If you want a random selection of bingo or lottery numbers you not only need to pick a random number, but a random number out of those remaining. e.g. for the lottery you first need a number between 1 and 49. If you get 5 then you next need a random number between either 1 and 4 or 6 and 49. There are 2 ways

- pick any number from 1 to 49 but check if you get a duplicate and try again. The disadvantage is the more numbers you pick the slower it may take to choose the next unique number.

- or simulate the balls in the lottery machine:
start with a list of the 49 numbers and pick a random number from 1 - 49,
take the selected number out of the list, so now you have a 48 number list
pick a random number from 1-48,
don't use the actual selected number but the number in that position in the list

Depending on the use if you want real random numbers it is much easier to pull balls out of a bag though.