How random is the Random function?

pHghostpHghost London, UKMember Posts: 2,342

I ran a small test with the randomizer, where I set it up to give a random number between 1-6 every 0.25s and I had the runtime count the occurrences of each number. Here are the results:


First off -- yes, by a freak coincidence, I stopped the runtime exactly at 800.05 both times. Dunno how I managed that.

So, the statistics (well, I ran it twice, so it's weak statistics for now):

In the first run, the difference between the highest and lowest number is 61, in the second 55. That means a relatively significant difference, somewhere around the 10% mark. Number 4 was on the lower side of things both times, once the lowest number, once the second lowest. No one number seems to have a upper hand though, and the 1 and 6 perform very averagely, even though they are at the edges of the randomizer's range (here average performance means it's good).

I attach the project file, if anyone wants to try running it as well, and share their results. I recommend running it for at least ten minutes, to get reasonable results. There is a timer at the bottom that shows elapsed seconds, to keep track of time.

What does everyone think?

P.S. I would actually be quite interested in how the GS randomizer is set up and where it sits on the scale of efficient/random. Of course, I am aware that no computer randomizer is truly random. ;)

«1

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @pHghost said:
    No one number seems to have a upper hand though, and the 1 and 6 perform very averagely . . .

    . . . after two tests !? :)

    @pHghost said:
    I attach the project file, if anyone wants to try running it as well, and share their results. I recommend running it for at least ten minutes, to get reasonable results.

    What do you mean by 'reasonable results' ?

    @pHghost said:
    What does everyone think?

    I think in any truly random system (or sufficiently random system) you are unable to tell anything from the generated results about the nature of the random system.

    For example, if you ran your test once an hour for a decade and the results came back 1=555, 2=555, 3=555, 4=555, 5=555, 6=555 each and every time, there is no reason to suspect that the random system is not functioning properly.

    And on the opposite side of the coin, regardless of what results are produced, our innate apophenia will almost guarantee we see patterns (Number 4 was on the lower side of things both times . . . etc).

    @pHghost said:
    I am aware that no computer randomizer is truly random. ;)

    Randomness might not exist outside of a computer either !

  • ADSentertainmentADSentertainment Member Posts: 397

    Randomness isn't really a thing. Randomness for the most part is theoretical and the only reason is exists is due to our ignorance. Let's say we flip a coin. It "appears" to be random, but if we were able to do calculations, by using the weight of the coin, and the arch it went at and the force applied, we could probably decipher what side it's going to land on. Same applies with computers. There is no true random on a computer. In order to make a number that we think is "random", the computer takes a number by using our computer's clock, which is a seed, and then does some other thing I'm guessing that I haven't learned about yet and it makes a random, or pseudo-random number.

    Having trouble with your game? Sounds like a personal problem.

  • pHghostpHghost London, UKMember Posts: 2,342

    Of course, if you go deep deep down, there is no randomness. The result of a coin flip is 100% explainable by the force, spin, the interaction with all the atoms in the air, etc.

    But the reason it IS near-perfect random for our purposes in the real world is due to the many forces playing a part. Your flip will NEVER, on a molecular level, be exactly the same as any other flip you've done. The density and motion of the air will be different, etc. The reason you can call it random, is because it depends on all these factors you cannot influence that have a life of their own (however much they are still bound by the laws of physics).

    When generating 'randomness' on a computer, you will never have as many unknown elements you cannot influence. You can introduce some (like the computer clock), but mostly it will rely on some kind of algorithm, which is a system. Thus it brings a level of order into the equation. This is why it is possible to crack encryption, if you have enough time and processing power.

    The more complex your algorithm, the closer you get to this so-called randomness, but also it costs you more processing power. So most generators will try to hit some kind of balance.

    @Socks said:
    . . . after two tests !? :)

    >

    What do you mean by 'reasonable results' ?

    Well, the amount of times I ran it is not as important as the number of cycles, which is 6 'rolls,' as that is the number of 'sides.' Which is why I was recommending to run it for a while. Over time you can see if there is any statistical drift with any of the numbers.

    Yes, it might mean absolutely nothing. But it might reveal a certain propensity of the algorithm.

  • jay2dxjay2dx Member Posts: 611

    are you attempting to make a winning lotto number probability generator by any chance haha! i could do with one of them! :)

  • SocksSocks London, UK.Member Posts: 12,822

    @jay2dx said:
    are you attempting to make a winning lotto number probability generator by any chance haha! i could do with one of them! :)

    You wouldn't need one as all lotto number combinations have the same probability.

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @pHghost said:
    Well, the amount of times I ran it is not as important as the number of cycles, which is 6 'rolls,' as that is the number of 'sides.'

    Not sure I understand, I checked out the code, every 0.25s one of the numbers gets incremented, and this is chosen randomly . . . . so what is cycling or doing the 'rolls', and what are the 'sides' - it just looks like a random number between 1 and 6 is chosen every 0.25s ? :confused: (confused) ?

    Sorry if I'm being stupid ! :smile:

    @pHghost said:

    Which is why I was recommending to run it for a while. Over time you can see if there is any statistical drift with any of the numbers.

    Not sure how you could tell ?

    @pHghost said:
    Yes, it might mean absolutely nothing. But it might reveal a certain propensity of the algorithm.

    Same question, how would you know if there was a propensity ? And how would a system with a propensity differ from a truly random system ?

  • pHghostpHghost London, UKMember Posts: 2,342
    edited August 2014

    @Socks said:
    Not sure I understand, I checked out the code, every 0.25s one of the numbers gets incremented, and this is chosen randomly . . . . so what is cycling or doing the 'rolls', and what are the 'sides' - it just looks like a random number between 1 and 6 is chosen every 0.25s ? :confused: (confused) ?

    Well, a random number between 1 and 6 is like rolling a 1D6, that's what I mean by sides. If you had dice, random(1,6) is a six-sided one, random(1,20) a twenty-sided one.

    0.25s is the frequency of the rolls. And one cycle is equal to the amount of sides.

    @Socks said:
    Not sure how you could tell ?

    Statistics. Looking at the numbers over time and across several tests.

    @Socks said:
    Same question, how would you know if there was a propensity ? And how would a system with a propensity differ from a truly random system ?

    You would see a propensity by seeing that some numbers are being more favored than others.

    A system with a propensity is different from a 'truly' random system because it is flawed in some sense. It is like using a loaded die during a roll. The system (either the algorithm, or the loaded die) is not balanced.

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @pHghost said:
    Well, a random number between 1 and 6 is like rolling a 1D6, that's what I mean by sides. If you had dice, random(1,6) is a six-sided one, random(1,20) a twenty-sided one.

    Ah, that's makes sense now, yes I see what you mean.

    @pHghost said:
    Statistics. Looking at the numbers over time and across several tests.

    Statistics can't tell you anything about a random system.

    @pHghost said:
    You would see a propensity by seeing that some numbers are being more favored than others.

    How does that differ from a random system ? Do you have an example of a result from a system that you could use to determine whether that system is random or not ?

    @pHghost said:
    A system with a propensity is different from a 'truly' random system because it is flawed in some sense.

    It may well be flawed, but that's not something you are able to tell by simply looking at the data generated by the system.

    Basically I can't seem to see how anyone could tell whether a random number generator was broken (flawed, non-random - etc), I can't imagine what series of numbers would reveal the lack of randomness ?

    [slowly fills out his lotto ticket . . . . :smile: ]

  • pHghostpHghost London, UKMember Posts: 2,342

    @Socks‌

    You cannot tell, with absolute certainty, but a series of numbers can reveal a lot about a pseudo-random system and it can lead you to finding out the 'system,' the algorithm behind it (well, not you as a person but a computer could decipher it). There's some very basic info here: http://en.wikipedia.org/wiki/Random_number_generator_attack

    Statistics cannot tell you anything about an truly random system, but this being a computer random generator, it is no secret that there is an algorithm which it runs on.

    I'm only musing here about how sophisticated it is, this thread is definitely not a complaint or anything like that.

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @pHghost said:
    You cannot tell, with absolute certainty . . .

    You can't tell at all !! :)

    Honestly !

    @pHghost said:
    but a series of numbers can reveal a lot about a pseudo-random system and it can lead you to finding out the 'system,' . . .

    Ah, a pseudo-random system, yes, maybe, but I thought we were taking about a 'truly' random system ? ("A system with a propensity is different from a 'truly' random system because it is flawed in some sense")

    Statistics cannot tell you anything about an truly random system, but this being a computer random generator, it is no secret that there is an algorithm which it runs on.

    If the algorithm is sufficienlty random, then I also can't see how you (or a computer) could determine anything about it, all data from a pseudo-random is compatible with a truly random system.

    Maybe we are driving off the point a little ! :smile: :wink:

    Anyhow, putting aside theory, the output of your project looks pretty random to me, but then again . . . :)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    I think the real point of randomness in a game is to keep the player guessing what will happen. If the random algorithm is good enough to keep the player from seeing the pattern then it is random in their reality.

  • pHghostpHghost London, UKMember Posts: 2,342

    @Socks said:
    Ah, a pseudo-random system, yes, maybe, but I thought we were taking about a 'truly' random system ? ("A system with a propensity is different from a 'truly' random system because it is flawed in some sense")

    We were kind of talking about both. ;)

    My original post was about the GS random function, which is astronomical units away from a truly random, as is any computer random number generator.

    @Socks said:
    If the algorithm is sufficienlty random, then I also can't see how you (or a computer) could determine anything about it.

    An algorithm cannot be random, that's the problem. An algorithm has to be defined. It creates 'random' number through a certain inbuilt system. It can take data that is constantly changing (like computer time, etc.) and that is the random 'seed,' which defines the 'random' string. For example take Minecraft. The worlds are 'randomly' and procedurally created. If you play 1000 games, you are going to find a new world every time. But if you take the seed (which is a character string) of your friend's world and put it into your copy of Minecraft (which you can do), you will get the same starting world (sometimes not, as they have changed the algorithm a couple times between versions I think, but definitely if you have the same version of Minecraft).

    @The_Gamesalad_Guru said:
    I think the real point of randomness in a game is to keep the player guessing what will happen. If the random algorithm is good enough to keep the player from seeing the pattern then it is random in their reality.

    Oh, absolutely. I'm not contesting that. Gameplay-wise for the player, I haven't come across problems with the GS random function. This was really just intellectual musing and interest in what is going on in the background of GS.

  • colandercolander Member Posts: 1,610
    edited August 2014

    @pHghost said:
    An algorithm cannot be random

    Could you make an algorithm to create a random number using random inputs that are random events in nature and constantly changing in real time. It might not be practical but could it be done using real time measurements of random events like weather events, barometric pressure, wind speed, wind gust, temperature, etc.

    It doesn't mean the system couldn't be copied and repeated but that doesn't disqualify it. It would still be a random number.

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @pHghost said:
    An algorithm cannot be random, that's the problem.

    That might be the case, that's why I included the caveat 'sufficiently' random (although pseudo), i.e. not easy for a person (or computer) to determine its workings / pattern / underlying process.

    Then again, like I say, if you are told that a system is 'truly' random (if such a thing exists) then there is no way to tell if it isn't.

    Also I'm not 100% sure that an algorithm cannot be random, although I've not really given it enough thought, maybe it's a case of hammering down a definition of 'random' (?), but for instance I can't imagine any definition of 'random' that might exclude an irrational number like Pi ?

    My suspicion is that if you were to agree a definition of random, then I suspect there are algorithms that would meet that definition.

    @pHghost said:
    An algorithm has to be defined. It creates 'random' number through a certain inbuilt system. It can take data that is constantly changing (like computer time, etc.) and that is the random 'seed,' which defines the 'random' string.

    I'm not sure how accurate that it, you only need an irrational number, multiply it not by the computer time but by something like the thermal temperature of the hard drive and then maybe divide the whole lot by the current wind speed in Holmsund on the Swedish coast, this kind of algorithm, although defined, can't really be said to be a 'certain'.

    Also I can't see how computer time could offer any randomness into a system as it's linear ?

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2014

    @colander said:
    Could you make an algorithm to create a random number using random inputs that are random events in nature and constantly changing in real time. It might not be practical but could it be done using real time measurements of random events like weather events, barometric pressure, wind speed, wind gust, temperature, etc.

    There's a lot of begging-the-question going on here ! :)

    If you had access to 'random inputs' (i.e. randomness was real and readily available) why would you then need an algorithm to generate randomness ? You could just measure the randomness.

    It's a little like saying how do we generate real magic, not slight of hand or stage magic, or any of that stuff, but actual real break-the-laws-of-physics magic ? . . . . Simple, we start by making a box, then getting some real magic and putting it in the box . . . :p

    But you are right in that we could generate an impracticably difficult to predict psuedo-random effect by referencing hard to predict events - but at some early stage there will always be a non-random deterministic element.

    I'm thinking of selling 'true' random numbers on the MarketPlace for people to use in their games, I don't want to reveal how they are generated for obvious reasons, but as a taster of the power of my new system, here are a few single digit 'true' random numbers I've generated with my system:

    9, 9, 7, 9, 1, 9

    I'll be selling a set like this (6 numbers inclining the commas) for $20.

  • pHghostpHghost London, UKMember Posts: 2,342
    edited August 2014

    @Socks said:

    >

    [...] this kind of algorithm, although defined, can't really be said to be a 'certain'.

    >

    Also I can't see how computer time could offer any randomness into a system as it's linear?

    What you describe isn't the algorithm. An algorithm is a mathematical formula, it cannot be random at all. It has to be coded, constructed. The number you get from the thermal temperature divided by the current wind speed in Holmsund on the Swedish coast is only the seed, it will be a number, a string you feed INTO the algorithm.

    It is not, as you say, easy for a person (or computer) to determine an algorithm's workings/process. But given enough time and/or computational capacity, it is possible. There are multiple examples to give of this being the case.

    a) During WWII, the Allies with the help of some early (primarily mechanical) computers, figured out the German Enigma and managed to decipher, many messages.

    b) If you look at any key generator used for pirating software, it is a direct result of hackers figuring out the algorithm that generates and validates valid serial number.

    Both a serial number and an enigma encoded message to a human looks like random letters and numbers. In a game they could be used as random number generators. But there is an order to them, hidden deep inside the algorithm.

    Computer time is a number string, a 'seed' like any other. It creates as 'random' a result as the thermal temperature divided by the current wind speed in Holmsund on the Swedish coast.

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    @pHghost said:

    What you describe isn't the algorithm. An algorithm is a mathematical formula, it cannot be random at all. It has to be coded, constructed. The number you get from the thermal temperature divided by the current wind speed in Holmsund on the Swedish coast is only the seed, it will be a number, a string you feed INTO the algorithm.

    Yes, understood, the input is the seed, but the irrational number which is fed by the seed can't be said to be predictable itself - although admittedly we'd still need something to feed it - but then again if we have an infinite sequence of random numbers we can use that to feed itself. For example we've no need to construct or code the infinite series of (finite) numbers that make up, for example, Pi (assuming it never terminates, something we don't really know), but like external input (the current wind speed in Holmsund) it will be (is as far as we know) unpredictable but entirely within maths, so we merely chose an arbitrary number from Pi, for example the 684 digits starting at the 51,489,239,332,838,333rd place, then use that number (a 684 digit long number) as the position within Pi to select our number from . . . .

    Now although you could argue that our arbitrary starting number, and the length of our selection to generate the longer number (which itself places the final number) are all external inputs, the same is true of any algorithm, maths will always need to be seeded in some way, we can't throw together a bunch of operators (+ * + / = ?) and get a result, we always need to seed (starts T-shirt printing business).

    I can't say this for certain but I'm not 100% sure an algorithm cannot be random, but like I say it might be a case of first defining 'random' before the question can be answered (or attempted), I'm not exactly sure what you mean by random, but I can't imagine a definition (outside of magic) that would prevent an 'unpredictable' outcome from an algorithm.

    Even the simple (!) process of iterating Pi produces a series of numbers I'd find hard to ring-fence from any definition of 'random', at least any I'm able to come up with, maybe it's a lack of imagination on my part.

    @pHghost said:

    It is not, as you say, easy for a person (or computer) to determine an algorithm's workings/process.

    Actually, assuming 'random' is a meaningful term, I don't think it's possible (rather than is no easy) to determine an algorithm's workings/process at all from its results, as all outcomes are compatible with 'random' ? But maybe I'm using 'random' arbitrarily here ?

    @pHghost said:

    But given enough time and/or computational capacity, it is possible. There are multiple examples to give of this being the case.

    - a) During WWII, the Allies with the help of some early (primarily mechanical) computers, figured out the German Enigma and managed to decipher, many messages.
    - b) If you look at any key generator used for pirating software, it is a direct result of hackers figuring out the algorithm that generates and validates valid serial number.

    I don't think either of these had a random element, they both had a lot of human input (especially Enigma which relied on an assumed pattern of laziness). The subject was really 'randomness', I was making the point that I can't see how the output of a random (truly random) system could be analysed at all, the reason Enigma was cracked was precisely because it was not random.

    @pHghost said:

    Computer time is a number string, a 'seed' like any other. It creates as 'random' a result as the thermal temperature divided by the current wind speed in Holmsund on the Swedish coast.

    Ah I see ! (I think?), so computer time is just the current time on the computer in seconds since it's been turned on, or milliseconds since the last crash, or something like that ?

  • colandercolander Member Posts: 1,610

    @Socks said:
    If you had access to 'random inputs' (i.e. randomness was real and readily available) why would you then need an algorithm to generate randomness ? You could just measure the randomness.

    If you want to produce a random number in a range or pretty much anything useful you will need an algorithm.

  • SocksSocks London, UK.Member Posts: 12,822

    @colander said:
    If you want to produce a random number in a range or pretty much anything useful you will need an algorithm.

    Yes, agreed, but if your random seed is external then all the algorithm is really doing is operating on the seed (scaling, ranging, quantising, rounding etc etc) rather than generating randomness itself, but like I say I still think it's possible to generate randomness in maths.

    It seems like I am arguing that randomness can be found in maths, but not in nature, sounds counterintuitive to me, but I'm being drawn that way.

  • POMPOM Member Posts: 2,599
    edited September 2014

    You actually made more then 6000 tests and not only 2.. The way I see it, you had a dice, and you rolled it about 6000 times in your test, and the results were pretty evenly devided..
    Random enough for me :)

    Roy.

  • colandercolander Member Posts: 1,610

    @pHghost @Socks it has been a good discussion your opinions are always interesting and informative. One like each :).

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    If a tree falls in the forest does anyone hear it?

  • mhedgesmhedges Raised on VCS Member Posts: 634

    @pHghost - You've noticed the random function is not as random as you (we) would like. It's happened to me in an app I did that pulls up words at random from several columns in a table. The closer the times between the "generate random words subroutines" (I hope you understood that), the higher the likelihood the words are either the same or the one before or after it. I believe I've read somewhere of doing a "random-random" (more than one random at once).

    I did it for an app, my first attempt at publishing, which got Heismaned by the guys at Apple, although that's another thread for ya. ;) I'll eventually port it to Android and make millions!!! muhahahah!!! Maybe randomly...

  • SocksSocks London, UK.Member Posts: 12,822

    @colander said:
    pHghost Socks it has been a good discussion your opinions are always interesting and informative. One like each :).

    I see your 'like' and raise you 3 'awesomes' ;)

  • pHghostpHghost London, UKMember Posts: 2,342

    @Socks said:
    we merely chose an arbitrary number from Pi, for example the 684 digits starting at the 51,489,239,332,838,333rd place, then use that number (a 684 digit long number) as the position within Pi to select our number from...

    While the string itself in Pi is random as far as we now, your selection is very specific. Anyone who takes the same sequence you did, from Pi, and feeds it into the same algorithm, will get the same results as you. It's repeatable, it's not truly random.

    @Socks said:
    I can't say this for certain but I'm not 100% sure an algorithm cannot be random [...] but I can't imagine a definition (outside of magic) that would prevent an 'unpredictable' outcome from an algorithm...

    That a algorithm cannot be random (in itself) is a mathematical fact. The output will always be predictable as long as you know what numbers are going in, if you have the algorithm. For you, as an observer, the output of an algorithm can be random enough, definitely for uses like gaming, but the algorithm as such never will.

    In fact, as far as random number generators go, the only ones (as far as I know) that generate truly random numbers, are physical random number generators, which are a piece of hardware. They generate the randomness through the use of some particles and whatnot, by way of quantum mechanics. And that is far beyond what I understand. :sob:

    @Socks said:
    Ah I see ! (I think?), so computer time is just the current time on the computer in seconds since it's been turned on, or milliseconds since the last crash, or something like that ?

    Yes, something like that. For the algorithm it is just a string of characters to do a calculation.

    @Socks said:
    If your random seed is external then all the algorithm is really doing is operating on the seed (scaling, ranging, quantising, rounding etc etc) rather than generating randomness itself, but like I say I still think it's possible to generate randomness in maths.

    The algorithm always needs a seed to operate. It doesn't care where you get that seed, if it's weather data or you just typing a string of number by bashing the keyboard.

    @Socks said:
    It seems like I am arguing that randomness can be found in maths, but not in nature, sounds counterintuitive to me, but I'm being drawn that way.

    Well, I would be inclined to say it sounds counterintuitive because it is the other way around. Nature is full of randomness. There are constant random mutations happening, in your body, your genes, in every living thing, all the time.

    Maths are a descriptive science, trying to find and define patterns and making that all into a working system. That's why you can rely on maths (together with physics, which in a way is applied maths) to calculate the flight of an airplane, for example. And it's how you create all your beautiful math-based and visually striking GS projects.

    @POM said:
    You actually made more then 6000 tests and not only 2.. The way I see it, you had a dice, and you rolled it about 6000 times in your test, and the results were pretty evenly devided..
    Random enough for me :)

    Roy.

    Yes, you are correct. That's why I was recommending people who want to try it let it run for some time. It's either around 6000, or around 1000 if you want to take a set of 6 (since it is a six-sided 'die') as one test cycle.

    @The_Gamesalad_Guru said:
    If a tree falls in the forest does anyone hear it?

    Well, the way this thread is going, I was thinking about petitioning the Mods to open us a dedicated Philosophy section on the forum. :)

    @Socks said:
    I see your 'like' and raise you 3 'awesomes' ;)

    What, no 'awesomes' for me? :p :trollface:

    @colander said:
    pHghost Socks it has been a good discussion your opinions are always interesting and informative. One like each :).

    Thanks!

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    @pHghost said:
    While the string itself in Pi is random as far as we now, your selection is very specific. Anyone who takes the same sequence you did, from Pi, and feeds it into the same algorithm, will get the same results as you. It's repeatable, it's not truly random.

    Of course ! But that's like saying anyone who takes the wind speed in Holmsund on the Swedish coast at the same time and location will get the same results . . . . to which you would answer 'then don't' ! :smile: . . . . . No one is suggesting you should use the same seed, the idea is that we chose an arbitrary number from Pi.

    @pHghost said:
    That a algorithm cannot be random (in itself) is a mathematical fact. The output will always be predictable as long as you know what numbers are going in, if you have the algorithm.

    You previous example of an algorithm that calculates Pi exists, we know how to produce them, but knowing the algorithm doesn't mean we know the output, the algorithm might be deterministic, but that doesn't make the output predictable.

    @pHghost said:
    The algorithm always needs a seed to operate. It doesn't care where you get that seed, if it's weather data or you just typing a string of number by bashing the keyboard.

    Yes, that certainly seems intuitive, but I'm not 100% whether it's true or not ?

    @pHghost said:
    Well, I would be inclined to say it sounds counterintuitive because it is the other way around.

    :smiley: We might have to disagree here.

    @pHghost said:
    Nature is full of randomness. There are constant random mutations happening, in your body, your genes, in every living thing, all the time.

    The argument against this would be that they are not random ! :smile:

    @pHghost said:
    Maths are a descriptive science . . .

    . . . a science which includes numbers that cannot be expressed as a ratio of integers !

    @pHghost said:
    And it's how you create all your beautiful math-based and visually striking GS projects.

    Lol, actually they are all done with Swedish weather charts :wink:

    @pHghost said:
    What, no 'awesomes' for me? :p :troll face:

    Ok, but only for alerting me to Vanilla's trollface emoticon.

  • pHghostpHghost London, UKMember Posts: 2,342
    edited September 2014

    @Socks said:
    Of course ! But that's like saying anyone who takes the wind speed in Holmsund on the Swedish coast at the same time and location will get the same results...

    Well! If you are going there yourself, measuring it yourself, and after inputting the measured data into the algorithm you destroy the measured data, I guess you've basically turned yourself into a living, breathing, true random number generator! :D

    @Socks said:
    The algorithm might be deterministic, but that doesn't make the output predictable.

    Oh, for us humans, absolutely, you're right. For a computer, if it knew the seed input, it would be 100% predictable.

    @Socks said:
    Yes, that certainly seems intuitive, but I'm not 100% whether it's true or not ?

    Simply put, if you bashed the keyboard, you could coincidentally, ahem, randomly punch in the exact same string of numbers as the weather data would provide.

    @Socks said:
    The argument against this would be that they are not random ! :smile:

    Well, you'll have to take that one up with some biologists...

    @Socks said:
    Ok, but only for alerting me to Vanilla's trollface emoticon.

    Fair enough. :)

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2014

    @pHghost said:
    Oh, for us humans, absolutely, you're right. For a computer, if it knew the seed input, it would be 100% predictable.

    You can have an algorithm, with a known seed, and not be able to predict the outcome just from knowing the seed and the algorithm, that is to say it would not be predictable, the only way to see what the results are is to run the algorithm - so although the algorithm might be deterministic in nature and have fixed (and known) values as its input the only way to see the result is to run the algorithm.

    There are numerous examples of this, irrational numbers, iterations of Pi, even things like John Conway's Game of Life / similar cellular automaton . . . enter the starting conditions, start the process, and you are unable to know the outcome from simply knowing the starting conditions.

    Iterations of Pi are a good example as regardless of how powerful a computer we could ever build, or even imagine, even a vast universal omnipotent computer that knew the energy state of every elemental particle that ever existed, knew where every quark and gluon was throughout the history of the universe, past, present and future - basically knew everything that was able to be known, that was knowable, then it would still not be able to predict the results of even a simple algorithm that iterates Pi, the results would always be unpredictable simply due to the fact that the number doesn't terminate, you simply can't predict an irrational number, even though you know the starting state (the input / seed / algorithm) you still need to run the process to see what the algorithm creates, that is to say - the answer is not 'in' the algorithm and the result is not predictable.

  • pHghostpHghost London, UKMember Posts: 2,342
    edited September 2014

    @Socks said:
    You can have an algorithm, with a known seed, and not be able to predict the outcome just from knowing the seed and the algorithm, that is to say it would not be predictable, the only way to see what the results are is to run the algorithm - so although the algorithm might be deterministic in nature and have fixed (and known) values as its input the only way to see the result is to run the algorithm.

    Yes, when I said that for a computer, if it was aware of the seed input and algorithm, the result would be 100% predictable, I meant it would be able to predict it because it would itself run the algorithm, knowing it.

    @Socks said:
    Iterations of Pi are a good example as regardless of how powerful a computer we could ever build, or even imagine [...] the results would always be unpredictable simply due to the fact that the number doesn't terminate, you simply can't predict an irrational number, even though you know the starting state.

    I think you contradict yourself here a little bit. The reason what you are saying would work with π (or any other irrational number), is only because, and if, the number doesn't terminate. That is, you actually do not know the starting state. Once you reduce π to a terminated, finite string of numbers, thus making it known, at exactly the same moment you are back at square one and the result is predictable by a computer.

  • AngryBoiAngryBoi Member Posts: 586

    Random is random. It is completely random.

Sign In or Register to comment.