TRUE random

hi..
i`m trying to make something like yamb game, and i`m far from making it, but here is my first problem:

numbers must be in range 1 to 6 and random() generates same numbers...
sooo, how can i make TRUE random numbers from 1 to 6?
You mean rand()? Did you seed the generator with something that changes, like the time? TRUE random numbers are practically impossible to come by unless you have a particular radioactive material (I forget the name) and a system to measure its emissions,
If you mean that each time you run your program the random numbers are always the same, just call strand(time(0)); at the beginning of your program. Even then you would have pseudo random numbers
Last edited on
if you use MS VC u could use the random-number-generators from Technical Report 1... they are "better" than those standard functions... i guess^^... and they are easier to handle with (depending on the purpose)...
Last edited on
Bazzy made a typo.
It's srand(time(0));

x86 should really come with a hardware random number generator.
thanks a lot, it helped..
BTW, true random numbers: http://www.random.org/

(You won't need that for a game though.)
<atheism>

There is no such thing as true randomness. "Random" is a catchall concept for things we just don't know how to recognize. Just because we fail to see a pattern doesn't mean there isn't one.

</atheism>
That sounds more like determinism than atheism.
I suppose it is. Though, in my mind the two are tightly linked to the point of being near inseparable. At least that's how my belief structure works.

It's atheism when you, instead of applying it to "Random/Patterns", apply it to "God/<insert phenomenon here>". God becomes the catchall to fill in the blanks for questions we simply don't have the answers to.

Thread derailment is fun.

EDIT: or maybe that is still determinism and isn't atheism at all. I always was kind of sketchy on the exact definition of those terms -- perhaps I'm using them all wrong. XD
Last edited on
the two are tightly linked to the point of being near inseparable.
Not really. I'm a determinist deist.

It's atheism when you, instead of applying it to "Random/Patterns", apply it to "God/<insert phenomenon here>". God becomes the catchall to fill in the blanks for questions we simply don't have the answers to.
Ehh... No, not quite.

Theism: There is a god/s.
Atheism: There is/are no god/s.

Determinism: The next state of the universe depends solely on the current state of the universe. Theoretically, the behavior of any system regardless of scale can be predicted.
Probabilism?: There is no relation between the current state of the universe and the next. (Example: When you drop an apple, there's a very small chance it will fall upwards, or annihilate the sun.)
Chistians (I've seen)*: If it can be explained and predicted, it's causal; if a human did it, it's free will; if it can't be predicted, it's random (such as a coin toss**); if it can't be explained, it's a miracle (divine intervention).

*I can't speak for other religions because they're rare, here, but I do think it applies to any religion that believes in free will.
**Some do realize that coin tosses or dice are actually causal.

And, for the hell of it,
Fatalism: X will inevitably happen. Think of it as misaimed determinism.
Last edited on
<Random/Patterns>

All here seem to agree (in one form or another) that defining Random is tricky. However, how do you define pattern?

What is a TRUE pattern?
Last edited on
Not really. I'm a determinist deist.


I hadn't heard of deism before. Having just now wikipedia'd it, I must say I find it interesting (albeit a little puzzling) and see that it does seem to go hand-in-hand with determinism pretty well.

I always have trouble categorizing myself. I can't say I'm really an atheist because doing so assumes I believe in an absolute truth; that truth being that God definately doesn't exist in any form. Which is not a statement I'm willing to make.

I suppose I'm more of a skeptical agnostic. I don't believe in God, but simply because I see no reason to -- there is no compelling (to me) evidence of his existence, but that doesn't necessarily mean I completely dismiss the possibility of God's existence.

However, I do tend to get a little sour towards other organized religions (Christianity and Catholicism mostly -- as that is what I'm most exposed to)... because they often try to speak in absolute truths. My previous remark about God being a catchall was kind of a stab at that mentality. When it's accepted that God is the reason behind X, you often stop looking for alternative answers, because God is perceived as absolute truth. My belief is that there may not be a definitive answer to any question, and that you should never stop searching for the "better" answer.

Ironically, I find that Christianity seems to share my position somewhat, though it gets bent to suit its needs. It speaks in absolute truths, yet constantly change what that truth is. Many of the beliefs, teachings, and practices of modern Christianity would have been considered heresy last millenium, but are perfectly acceptable today.


All here seem to agree (in one form or another) that defining Random is tricky. However, how do you define pattern?

What is a TRUE pattern?


I simply used it as the opposite of "random".

A pattern is anything that can be theoretically predicted with enough forehand knowledge. Random (true randomness) implies that it's impossible to predict.

random.org says it uses "atmospheric noise" to drive it's random number generators, but I'd argue that even something like that is theoretically (but not realistically) predictable if you know enough about environmental factors, what influences them, and how they're changing.
Randomness is a pattern.
I suppose I'm more of a skeptical agnostic. I don't believe in God, but simply because I see no reason to -- there is no compelling (to me) evidence of his existence, but that doesn't necessarily mean I completely dismiss the possibility of God's existence.
That's an unusually moderate thought. Then again, most of the atheists I've seen are of the TheAmazingAtheist variety.

Ironically, I find that Christianity seems to share my position somewhat, though it gets bent to suit its needs. It speaks in absolute truths, yet constantly change what that truth is. Many of the beliefs, teachings, and practices of modern Christianity would have been considered heresy last millenium, but are perfectly acceptable today.
Well, it's contradictions were what drove me away. Yes, I was baptized.
But you'll never find any religion that doesn't speak in certainties. Religion is primarily a matter of faith. If you say "God may exist", it's because you're prepared to accept that he doesn't.
Most atheists [I've seen] are faithful. They don't say "God may not exist" or "I can't prove God exists"; they say "God doesn't exist". When you point this out, they'll argue that it's the believers that need to provide evidence, ignoring that some have rational (as in, derived from reasoning, rather than nature) evidence to support the claim. Of course there are also those who have rational evidence against it, so the matter is undecidable.


As for the predictability of random.org, as it's FAQ states, hard determinists say that quantum phenomena are deterministic. Einstein was one of them. If quantum mechanics is deterministic, then of course atmospheric noise, radioactive decay, and even cosmic background radiation are deterministic.


EDIT: I think this is way too off-topic for a programming forum. Perhaps it would be more appropriate to continue in the lounge section if there's anything else to say.
Last edited on
Topic archived. No new replies allowed.