TerranFury: calling rand() or any pseudorandom generating function many times does not increase the randomness of the number.
unless the function isnt return a big enough number for your programs purposes, calling it more than once is just going to waste cpu cycles...
ie.
int number = rand()
int number = (rand() + rand() + rand()) / 3
both have the same "randomness".
True AI
quote: Original post by Smurfwow
int number = rand()
int number = (rand() + rand() + rand()) / 3
both have the same "randomness".
again, nope!
the second will give you a bell-curve-like distribution (although the technical terms elude me)...
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
Ok, when I take about our brain working in random here is what I am thinking:
Suppose you were given 3 diffrent choices of things to eat. A steak, candy, or a salad. In the end, your choice will be random. I know that you can come to a logical conclusion as to what the person is going to pick (a child might pick candy, a person on a diet might pick the salad, and almost anyone else might pick the steak). If you were on the diet, everyone else would expect you pick the salad; that is a given; but if it was a special occasion, then you might pick the steak or candy; if you were really into the diet, and trying to stick too it all the time, then people would still expect you to pick the salad; but you still had the oppertunity to pick one of the others, and you could have probally decided to go off the diet without telling anyone, or you could have chosen right then and there to go off the diet and pick either the steak or candy. Thus the choice you make is completely random. Granted it will be influenced on other things, it is utimatly random.
Suppose you were given 3 diffrent choices of things to eat. A steak, candy, or a salad. In the end, your choice will be random. I know that you can come to a logical conclusion as to what the person is going to pick (a child might pick candy, a person on a diet might pick the salad, and almost anyone else might pick the steak). If you were on the diet, everyone else would expect you pick the salad; that is a given; but if it was a special occasion, then you might pick the steak or candy; if you were really into the diet, and trying to stick too it all the time, then people would still expect you to pick the salad; but you still had the oppertunity to pick one of the others, and you could have probally decided to go off the diet without telling anyone, or you could have chosen right then and there to go off the diet and pick either the steak or candy. Thus the choice you make is completely random. Granted it will be influenced on other things, it is utimatly random.
My email is ruai@comcast.net
quote: Original post by zzzomed
Suppose you were given 3 diffrent choices of things to eat. A steak, candy, or a salad. In the end, your choice will be random.
That''s a load of horse hooey.
Your decision is based on your nutritional needs, both from knowledge and the feelings being transmitted to your brain based on your physical feelings related to lack of protien, sugar, whatever. Additionally, your decisions are based on what others might think of you, drawing from how your relationship is with the ones you are with. Additionally, your decision is based on the subtle persuasions made by others near you. Additionally, your decision is based on your past experiences with regard to the particular food choices at hand: Did the chef burn the steak last time? Was the candy not to your liking? Do they not have your choice of salad dressing?
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
I concur with BP on this one... just because an external observer doesn''t have access to the internal decision making process of the observed, doesn''t mean the observed is making a decision randomly!
The decision, if rational, is made so as to maximise some internal measure of utility. In this case, the person making the decision might use nutritional value and taste as utility variables and choose the food item that maximises some combination of these variables.
If the decision is irrational, then the decision maker will make a selection (from the decision possibilities) that is sub-optimal in terms of the utility.
None of this has anything to do with random, except perhaps where there is absolutely no information to go on, including any sensory information!
Timkin
The decision, if rational, is made so as to maximise some internal measure of utility. In this case, the person making the decision might use nutritional value and taste as utility variables and choose the food item that maximises some combination of these variables.
If the decision is irrational, then the decision maker will make a selection (from the decision possibilities) that is sub-optimal in terms of the utility.
None of this has anything to do with random, except perhaps where there is absolutely no information to go on, including any sensory information!
Timkin
yes, my theory is flawed.
But my point is still correct.
calling rand() more times makes the number less random than calling it once.
It is more likely to be closer to the middle when called multiple times a la a bell curve.
But my point is still correct.
calling rand() more times makes the number less random than calling it once.
It is more likely to be closer to the middle when called multiple times a la a bell curve.
quote: Original post by Smurfwow
TerranFury: calling rand() or any pseudorandom generating function many times does not increase the randomness of the number.
When I referred to "copious quantities of calls to rand()" I did not mean that putting rand() in a loop would make the distribution any more random. All I meant by that was that many different attributes and decisions would be controlled by pseudorandom numbers - nothing more!
As for "true randomness," I will say this: I don't like the idea. In quantum mechanics, for example, I have trouble believing that everything is random. I have a feeling that there are simply more factors at work than we currently understand. As Einstein said, "God does not play dice." Of course, though, I don't think any of us are really qualified to say what God does or doesn't do!
However, in quantum mechanics, the idea of randomness has proven fruitful, regardless of whether or not the events are 'truly' random (whatever that really means). This same philosophy can be applied to AI: Use random numbers where there is simply too much going on to hope to compute. Because if it provides a decent appearance of reality, then that's all you need.
Now, as Kylotan pointed out, this kind of thinking doesn't make sense in many games. A chess player, for example, shouldn't make random moves (unless if it is choosing between moves with identical fitnesses, perhaps). IMHO: In most genres, however, there is a purpose for random numbers - but there is no inherent advantage to randomness; it is only a substitute for the currently uncomputable.
[edited by - TerranFury on April 2, 2002 10:09:53 PM]
>> Ok, our problem is definattly our difference in the defination of Randomness...
I first ran into my first really deep thoughts on the concept of "random" one day when I noticed my one friend was really into Rubic''s Cubes (he had like 5 of them ''randomly'' scattered about his house =-) Anyway, they were always in perfect ordered shape. Of course, my other friend and I always liked to see if we could get a cube to the point of unsolvability (hell, I couldn''t figure out how to solve one of those things in any near-ordered state... Rubic''s Cubes are not my forté).
And I stumbled across the notion there is a certain blurry point where you can no longer make it any more random (there''s obviously 1 ordered state and quite a lot of unordered states... that''s entropy for ya). That''s when I realised "random" is just one of those anthropologic concepts that you can''t really define perfectly without complete understanding of the universe (like emotion, self-conciousness, or morality).
My friends and I also played cards games. Another great experience to think about "randomness". My friends always bytched when I would play multiples of copies of a card in a rather short amount of time. He accused me alot of cheating and not shuffling (maybe I was just a bad shuffler). One day he looked through my deck and saw a few pairs of cards in succession and commented on it. Then my previous Rubic''s Cube solving friend made the point a truely random order of the cards would not be exempt from having adjacent copies of the same card. I followed up by "accusing" him of almost NEVER getting pairs of cards! After all, it''s only a matter of time before you draw two identical cards in succession, right? But he almost never did and he was proud of it. But if he truely shuffled his deck thouroughly, he WOULD get pairs in succession. Unfortunately, he was resolute in believing that I wasn''t shuffling well enough.
"Randomness" is it is a matter of perception. If a person flips a coin and they cover it up and look at it in private, there''s a 100% chance it''s in the state it landed in. However, to 3rd party observers, it would appear to be in an indeterminent state with a 50-50 chance of either heads or tails. If they then look at the coin, the one posible state collapses and the other becomes prevailant. Sounds familiar, eh?
Personally, I don''t believe in "random" events, because it ruins casuality which is easily observed on all levels of the universe execpt quantum physics. But quanta are pretty darn small, and it''d be pretty easy to miss any sub-quantum processes that may attribute to this "random" phenomenon. Think of a pressurized canister of gas. We know the mechanical physics each particle must follow and theoretically, if we could slow down time to make a computer model of the canister, we could accurately predict the destination of all the particles at any point in time and we could also tell from what state they originated from. But most chemistry classes teach that the molecules move randomly. Why is this? For mechanical purposes, it is unimportant in standard practice, it is extremely complicated (in both required knowledge in physics and the number of particles), and lastly, we do not possess means to gather the required data from the canister. If there were such sub-quantum processes, all three would apply very well. We may not currently be able to measure them (they may not even BE measurable), they probably follow drastically different physical laws than matter and energy, and they aren''t all that important in practice (Quantum computers would still be able to generate near perfect random results). That''s just my thought on the matter though.
Plus, the phrase "randomly ordered" is an oximoron.... that''s as anthropologic as you can get. Anthropoids are so self-indulgent =-)
I first ran into my first really deep thoughts on the concept of "random" one day when I noticed my one friend was really into Rubic''s Cubes (he had like 5 of them ''randomly'' scattered about his house =-) Anyway, they were always in perfect ordered shape. Of course, my other friend and I always liked to see if we could get a cube to the point of unsolvability (hell, I couldn''t figure out how to solve one of those things in any near-ordered state... Rubic''s Cubes are not my forté).
And I stumbled across the notion there is a certain blurry point where you can no longer make it any more random (there''s obviously 1 ordered state and quite a lot of unordered states... that''s entropy for ya). That''s when I realised "random" is just one of those anthropologic concepts that you can''t really define perfectly without complete understanding of the universe (like emotion, self-conciousness, or morality).
My friends and I also played cards games. Another great experience to think about "randomness". My friends always bytched when I would play multiples of copies of a card in a rather short amount of time. He accused me alot of cheating and not shuffling (maybe I was just a bad shuffler). One day he looked through my deck and saw a few pairs of cards in succession and commented on it. Then my previous Rubic''s Cube solving friend made the point a truely random order of the cards would not be exempt from having adjacent copies of the same card. I followed up by "accusing" him of almost NEVER getting pairs of cards! After all, it''s only a matter of time before you draw two identical cards in succession, right? But he almost never did and he was proud of it. But if he truely shuffled his deck thouroughly, he WOULD get pairs in succession. Unfortunately, he was resolute in believing that I wasn''t shuffling well enough.
"Randomness" is it is a matter of perception. If a person flips a coin and they cover it up and look at it in private, there''s a 100% chance it''s in the state it landed in. However, to 3rd party observers, it would appear to be in an indeterminent state with a 50-50 chance of either heads or tails. If they then look at the coin, the one posible state collapses and the other becomes prevailant. Sounds familiar, eh?
Personally, I don''t believe in "random" events, because it ruins casuality which is easily observed on all levels of the universe execpt quantum physics. But quanta are pretty darn small, and it''d be pretty easy to miss any sub-quantum processes that may attribute to this "random" phenomenon. Think of a pressurized canister of gas. We know the mechanical physics each particle must follow and theoretically, if we could slow down time to make a computer model of the canister, we could accurately predict the destination of all the particles at any point in time and we could also tell from what state they originated from. But most chemistry classes teach that the molecules move randomly. Why is this? For mechanical purposes, it is unimportant in standard practice, it is extremely complicated (in both required knowledge in physics and the number of particles), and lastly, we do not possess means to gather the required data from the canister. If there were such sub-quantum processes, all three would apply very well. We may not currently be able to measure them (they may not even BE measurable), they probably follow drastically different physical laws than matter and energy, and they aren''t all that important in practice (Quantum computers would still be able to generate near perfect random results). That''s just my thought on the matter though.
Plus, the phrase "randomly ordered" is an oximoron.... that''s as anthropologic as you can get. Anthropoids are so self-indulgent =-)
April 03, 2002 05:00 PM
"My friends always bytched when I would play multiples of copies of a card in a rather short amount of time. He accused me alot of cheating and not shuffling (maybe I was just a bad shuffler). "
This is sort of funny because if anything if you shuffled the deck perfectly then it would return to its original state or a predictible order, its imperfections that allow the cards to take on some form of ''randomness''.
This is sort of funny because if anything if you shuffled the deck perfectly then it would return to its original state or a predictible order, its imperfections that allow the cards to take on some form of ''randomness''.
Just to clarify a little...
... Tac-Tics suggested that we should be able to (hypothetically) slow time and see a cannister of gas in terms of a finite number of particles moving with deterministic trajectories and hence predict the entire future of the gas (given its environment and the known laws of mechanics).
There are two problems with this. The first is the Heisenberg Uncertainty Principle. If you attempt to isolate the position of a particle you increase the uncertainty in it''s momentum. Alternatively, if you try to determine it''s momentum, the uncertainty in its position grows.
Secondly, it is a mistake to believe that atomic, sub-atomic and quantum particles act according to the laws of kinematics. They don''t. This is why we have statistical mechanics and quantum mechanics. Indeed, the laws of kinematics only describe the average behaviour of macro objects in simplified worlds.
The basic result from these two fields is that a ''particle'' can and should be visualised as a wave function; essentially a probability density function over the possible states that a theoretical single state particle could occupy. The point is, the particle is not in one state, but rather all of the states at the same time. This might seem an absolutely absurd model of reality, but it fits the observable evidence and this model leads to predictable results (in the limit of systems, such as mean free energy, mean state, etc.). This is where randomness comes in at the quantum level; this indeterminacy of states and hence unpredictability of a single future state. The best that one can do is compute a posterior distribution on states. Some would say that we''re just missing some lower level physics that predicts the process. To date, no one has any inclination what this physics would be. Additionally, since the quantum and statistical mechanics theories fit the observables and the predictables, then there is no need to abandon them yet.
Ultimately, randomness is based in our definition of causality, which springs from high correlations between observable events. A quick question to get you thinking about this... given the collision between two moving billiard balls on a billiard table, can you predict the exact states of each ball and the table after the collision... and we''re talking about the real world now... not some simplified, smooth and frictionless approximation to it!??? Do the laws of kinematics really apply here?
The answer is in fact no! Have a think about it for a while and see what reasons you come up with. Then ask yourself what this means for causation!???
Cheers,
Timkin
... Tac-Tics suggested that we should be able to (hypothetically) slow time and see a cannister of gas in terms of a finite number of particles moving with deterministic trajectories and hence predict the entire future of the gas (given its environment and the known laws of mechanics).
There are two problems with this. The first is the Heisenberg Uncertainty Principle. If you attempt to isolate the position of a particle you increase the uncertainty in it''s momentum. Alternatively, if you try to determine it''s momentum, the uncertainty in its position grows.
Secondly, it is a mistake to believe that atomic, sub-atomic and quantum particles act according to the laws of kinematics. They don''t. This is why we have statistical mechanics and quantum mechanics. Indeed, the laws of kinematics only describe the average behaviour of macro objects in simplified worlds.
The basic result from these two fields is that a ''particle'' can and should be visualised as a wave function; essentially a probability density function over the possible states that a theoretical single state particle could occupy. The point is, the particle is not in one state, but rather all of the states at the same time. This might seem an absolutely absurd model of reality, but it fits the observable evidence and this model leads to predictable results (in the limit of systems, such as mean free energy, mean state, etc.). This is where randomness comes in at the quantum level; this indeterminacy of states and hence unpredictability of a single future state. The best that one can do is compute a posterior distribution on states. Some would say that we''re just missing some lower level physics that predicts the process. To date, no one has any inclination what this physics would be. Additionally, since the quantum and statistical mechanics theories fit the observables and the predictables, then there is no need to abandon them yet.
Ultimately, randomness is based in our definition of causality, which springs from high correlations between observable events. A quick question to get you thinking about this... given the collision between two moving billiard balls on a billiard table, can you predict the exact states of each ball and the table after the collision... and we''re talking about the real world now... not some simplified, smooth and frictionless approximation to it!??? Do the laws of kinematics really apply here?
The answer is in fact no! Have a think about it for a while and see what reasons you come up with. Then ask yourself what this means for causation!???
Cheers,
Timkin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement