I knew I had seen it somewhere. Of course, xkcd.Nixola wrote:http://xkcd.com/221/
Please put a good PRNG in 0.8.1
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Please put a good PRNG in 0.8.1
When I write def I mean function.
Re: Please put a good PRNG in 0.8.1
Entropy is a different notion than (but connected to) distributions of random variables, so...Hexenhammer wrote:No, I thought I made it clear that I wasn't talking about distribution issues at all.vrld wrote:And by "truly random" sequence you probably mean "high entropy", which is what I wrote in the part you kindly mitted...
Entropy measures how much new information we get by observing stuff. In this example, the entropy of '7, then 1' (formally: H(7|1)) is less than '7, then 2', because we know that '7, then 1' happens more often than other patterns. In other words, it is more interesting to see '7, then 2'. The ideal RNG has entropy H(x) = 1 for any number in the range. `randomB()` does not have this property.Hexenhammer wrote:randomB(1, 10)
May return: 3,6,7,1,1,3,4,8,9.. and if we call it often enough and measure we find that it returns as many 3s as it return 4s etc. (...) However, this "RNG" actually has the characteristic that a 7 is followed by a 1 much more often than by any other number.
Looking at it from another angle, randomB() does not produce uniformly distributed numbers, just because '7, then 1' is more likely than '7, then 2'. Formally, we can say that P(1|7) > P(2|7), which translates to: the probability of 1 given that we know 7 came before is bigger than probability of 2 given that 7 came before. This violates the 'uniform' characteristic: If `randomB()` returned uniformly distributed numbers, then the probabilities should be equal. Even stronger, the probability of producing a number must not depend on what number(s) have been drawn before: P(1|7) = P(1) = P(2) = P(2|7) (statistical independence).
I think we are talking apples and oranges here. Or we have different definitions/names for basically the same thing.
Anyway, this discussion is getting slightly out of hand. Should we be writing
Edit:PMs -> Love Letters
Last edited by vrld on Fri Feb 22, 2013 6:38 pm, edited 1 time in total.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Please put a good PRNG in 0.8.1
That reminds me, why are they not named "love letters"?vrld wrote:Should we be writing PMs instead?
Re: Please put a good PRNG in 0.8.1
That would necessitate a pink envelope icon, yay.bartbes wrote:That reminds me, why are they not named "love letters"?vrld wrote:Should we be writing PMs instead?
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Please put a good PRNG in 0.8.1
"I consider, that you commit an error. Write to me in love letter"bartbes wrote:That reminds me, why are they not named "love letters"?vrld wrote:Should we be writing PMs instead?
hmm...
- Hexenhammer
- Party member
- Posts: 175
- Joined: Sun Feb 17, 2013 8:19 am
Re: Please put a good PRNG in 0.8.1
Agreed. I could continue it by arguing against your definition of "uniform distribution" for starters but I have other things to do too - like continuing to develop my first LÖVE gamevrld wrote: Anyway, this discussion is getting slightly out of hand.
The original point of this thread - me petitioning for a different PRNG implementation - was already addressed so I will just let this issue rest here
Who is online
Users browsing this forum: No registered users and 3 guests