Wednesday, 25 January 2012

Home » , , » How to get True Random...

How to get True Random...

Hey again everyone.. time for a complex post..
How can you get a random value?????

Well firstly what is random?

Random = Something that isn't stored then accessed but rather is just there and used for what ever reason it may be.

Nothing is truly random not even the thoughts that run through your mind!
If for example I say think of a animal, you will think of a animal based on the things that lead up to that point in time.

For example.. Say you thought of a "Cat" at first because you like them or you can see one sitting not far from you now, or you saw one earlier that day.
However you then changed your mind about the "Cat" and changed your animal to a dog then thought of a lion then a tiger and then for some reason a donkey, and you decided to stick with a donkey.
You now feel that your chosen animal is completely random

Reason why you chose that final animal:
We know why you chose "Cat" to start off with because you like them or you can see one sitting not far from you now, or you saw one earlier that day, but you changed your thought to dog because its different from a "Cat" but it also links in with you though of a "Cat".
They are both pets they are both common, if anything its the exact same group of choices.. eg cat, dog, fish, bird but its the one that fits in best with your first thought of "Cat"

You then start to think.. "Yeah ok I have changed my mind and so its even more random to those that know me but its still a common and simple thought and so i should change it."
Problem is you now have the thoughts of a "Cat" and a "Dog" in your mind, so you choose a lion which is a less common animal but it still has links to your cat.
(Remember your trying to change your random animal and your currently on a dog.. so your bound to think "it has to be different from a dog and less common" thus you come up with a cat but uncommon)
Now you have changed your mind twice to try and get a random animal but you feel its not enough to make it unguessable so you try again.. "Tiger".. but this is due to you having 2 cats in your mind and thinking of something like a lion as you think lion isn't a bad idea but it needs to change.

Problem is that too common too.
Although my next animal was a donkey my next actual though was a whale due to it being rarely thought of and i wanted to change away from cats and dogs.. but if you remember i said at the beginning.. cats, dogs, fish, birds and a fish is linked to cats.
I wanted something random thus donkey.

How did I get to my random animal?
Well.. firstly I took the first idea given to me and removed it from my list of animals that i have in my brain.
I then removed anything linked to it in anyway. (By one step eg dogs fish etc)
I found its opposite and removed that (Dog)
Then with whats left in my list i looked for something less common and removed that and anything linked to that.
I continued this process until i was left with one thing left in my mind.(list)

How to do this with numbers??
Not too sure yet :P

Can I just say I think in your attempt to eliminate bias you've created it? You removed things linked to your original idea in an attempt to stop yourself choosing it due to the link. What you've actually done is eliminated the possibility of it being chosen completely. That's the bias. Randomness occurs without pattern or reason, yes, but you've given things reasons not to occur.
Good luck on your quest of random by the way. :)

"Friend 2"
Interesting concept but inaccurate. To pick a truly "random" animal there'd have to be an equal chance of you picking cat or dog as picking horse or penguin. Hence such a method would bias your choice.Instead you'd be left with something that only appeared random by itself, but is just in fact uncommon. However true randomness requires something to have a random distribution. The number pi for example produces a random sequence of digits which can be shown by applying statical methods to, say, the first 10 billion digits and you'd find that they are in fact random. That is to say that all the digits show up a roughly equal number of times.

I know this and you are both right.. but this is where i come to the stand still..

Our minds believe we think random and yet we dont.. so the question is how can we truely program something to actually create/get a random number :S

One way i found people getting random numbers was to record a number that was based on the sound detected.. so for instance if the sound was at a pitch of 5 you would get a 5 and then they placed that probe in the open and used that probe to gather a random number.. HOWEVER again its not random.. if you knew where the pitch for 6 was you could effectively get a 6

if you were smart enough you would say that at 6:oo every day you get a sound traveling from x direction and sound b traveling from direction y at A and B pitches thus you could figure out what the sound pitch would be through out every second of the day using the facts of what sounds are made.. :S

There are fake random algorithms that computers use, but I can't think of a way to program true randomness into anything. I mean, you could try using something like atmospheric noise, (as that has a random distribution in its way) measure that and then program accordingly. Otherwise, it seems impossible.

To program something random is a contradiction in its self. but it has to be possible.. right? :S

Why must it be possible? I'm not saying it's not, but I'd like to know what you think.

"Friend 2"
Atmospheric noise is used, however for the purpose  "ME"  wants it for, it'd be useless, you need a DPRNG (deterministic pseudo-random number generator) most of them are not random, but just have a massive period of repetition which is enough.

"Friend 2"
If random = set of values that fit a random distribution, then it's perfectly possible, even if it's deterministic

The only true randomness i know of is quantum foam.. but if i could program something to be as random as quantum foam.. well i dont think id be working at sainsburys xD

And I see what your saying  "Friend1" but looking at things from a complete nothing is random point of veiw doesnt help me with trying to create a uncrackable code encoder

Yeah, but that's the point. PSEUDO-random.  "ME"  wants TRUE randomness, so a DPRNG does not help.

If it was random based on a script of code then surely its not random.. so how? O_o

If you look at what I've been saying, that's not at all how I'm looking at things.

I know that im just saying if that was the way we looked at things :P

Well, the only way I can see is if you have something external that is random and you monitor it, but since I've never looked into what a code encoder is... I can't know whether that'd be any help.

"Friend 2"
"Friend1" , he doesn't true randomness would be impossible to predict and thus make an encoder entirely useless. DPRNG is vital to that, it needs to appear indistinguishable from true randomness, while being easily re-creatable providing you have the key. I should know it was my idea XD

"Friend 2"
‎*at least I came up with it myself, the fact that it's already being used is a minor thing >_> XD

hmmm how about this.. Firstly a short statement..
"You will never guess who i randomly bumped into in town."
"Only  "ME" "
"Well actually you only bumped in to  "ME"  because it just so happened that he was in town and in the same place as you without you knowing.. if however you knew he was in town and was in that spot you would not be classing the meeting with  "ME"   as random"

This states that true randomness is not random at all but mearly a series of events that lead up to something unknown happening.. so if i had 1000 box's and I was told to pick a box my out come would be "Random" however IF I knew where the numbers were than it wouldnt be random..

So in a form of encoding surely i could use the same concept..
Say i want to encode a letter "A" what i could effectivly do is set A to have a random value..

So how to do that? well seeing at memory works like our 1000 box's what we could do is look for the first A held in a memory location.

There are thousands of A's in memory locations and they change on a regular basis so to find the 1st one would in effect give us a random value.. right?

So.. hmmm you would have to some how store the values for each char eg "a" "A" "b" "B" in a array so that you could look back on them if need be.. also if the first of a char ends up being the same as a first of another char due to changesthen you would choose the second and so on..

We would now have a "Random" value for each char based on no list or no basic code to get them.. if anything every time you ran the code it would get different values.. then what you would do is save the array to the encoded file as a array would only be small and then encode that array with a simple password so that you need the passord to decode the array andthen the array is used to decode the file

hmmm problem there is that if you brute forced the passwor then you have the array and can decode =[
So you would have to have a way of mixing the array with the code so that its hidden and then really securing the password some how :S

"Friend 2"
Actually true randomness is something that is entirely unpredictable, it's got nothing to do with whether or not it's known or not. Cryptographic randomness in this context requires that the data appear entirely random, but be predictably generated if given a seed. So your method might be adequate for games and suchlike, but for cryptographic, it would be a little impractical.

No.. i have come to the conclusion that true randomness can't exist.

You say "true randomness is something that is entirely unpredictable, it's got nothing to do with whether or not it's known or not."
And i agree with that statement.. however everything can be predicted if we understood how it worked.. even quantum foam.

Random is the same as infinity.. they are words used to describe something that cant exist, but yet do only because we don't understand it.

So to encode something using "Random" values or chars is impossible.

To encode something that seems random (like you said) is possible but again its not random

So the best way to encode something is to make the output SEEM random.
To do that you need to make a process that creates things that SEEM random.
And again things SEEM random when you don't understand it (thus the "I randomly bumped into  "ME" ")
So to create encription to SEEM random you just have to encode the data in a way that new and difficult to understand. =]

"Friend 2"
Not just that but you also have to make it look random XD it's not a matter of not understanding it, it's a matter of all values having equal probability and suchlike, you have to make it look like background noise or atmospheric disturbances. Also due to the uncertainty principle not everything is entirely predictable as nothing is entirely mesurable. The BSI has a set of evaluation criteria that're listed on the PRNG wikipedia page, you should check it out.

So basically, this discussion has led straight back to the conclusion we had in the first place?

"Friend 2"
Yes  "BRO" , yes indeed XD

Wow. I hope you guys feel accomplished. :P
Share this games :


Post a Comment