Why do I have such bad luck?

I guess the debate mainly caused by suckie situations like this ...

While attacking in Celtic territory at Gergovia, Catapult 73 (Seoul) loses to Celtic Gallic Warrior (3.84/6) (Prob Victory: 41.9%)
While attacking in Celtic territory at Gergovia, Catapult 77 (Seoul) loses to Celtic Archer (2.01/3) (Prob Victory: 89.3%)
While attacking, Catapult 74 (Moscow) (Catapult) decimates Celtic Archer (Prob Victory: 89.0%)
While attacking in Celtic territory at Gergovia, Catapult 76 (Constantinople) loses to Celtic Catapult (1.85/5) (Prob Victory: 82.8%)
While attacking in Celtic territory at Gergovia, Catapult 78 (Moscow) loses to Celtic Gallic Warrior (2.22/6) (Prob Victory: 93.7%)
 
Nah, more like this

Code:
int GetRandomInt(void)
{
     return 4; // random number produced by rolling a fair dice
}
 
20 Stack (100% chance) vs. 1
Let 100% = 99.5
199:1 odds

Examples: 20 losing random numbers (sorted)
0000 1111 2222 3333 4444 average w/five numbers
0000 0000 0000 0000 1234 extreme w/five numbers
0000 0000 0000 1111 1234 equation w/five numbers (typical break)

999:1 odds a number is generated (in a perfect world)
20/1000 sequence (not all numbers will be generated)
We should see roughly 20 numbers +/- magnitude boundaries.
20^1/2 = 4..5
20^1 = 20 ;)
20^2 = 400
Magnitude Boundaries = 0.224..0.400
We expect to observe:
… no more than 5 repeated numbers
… at least 8 unique numbers
#### #012 3456 7??? ????
… (# = 0..7)
… (? = 8..999)
0000 0012 3456 789A BCDE magnitude w/6x0, 15 unique numbers (worst case)
LLLL LLLL LLWW WWWW WWWW 10 Losses, 10 Wins (worst case)

Examples: (0 PoV)
Average 4:1 = 0.20, 4/15 unique numbers, 100% loss
Extreme 1:4 = 0.80, 4/15 unique numbers, 100% loss
Equation 2:3 = 0.60, 4/15 unique numbers, 100% loss (typical break)
Magnitude 7:3 = 0.30, 15/15 unique numbers, 50% loss (worst case)

Only one example is within the magnitude boundaries (0.224..0.400).

In a TRNG, magnitude changes are expected.
In a PRNG, magnitude changes suggest equation error (ie distribution).
Why?
… TRNGs and PRNGs differ in magnitude.
… Observing 1000000:1 events on a 1000000000000:1 scale is expected;
… Observing 1000000:1 events on a 100:1 scale is not.

Summary:
... Given accurate odds:
… ... This is an atypical distribution.
… ... It probably has a period in excess of 20
… … ... (it was observed more than once).
… ... It is consistent with known weakness in the chosen RNG.
 
That doesn't like probability or statistics calculations at all to me though. I have no idea what those calculations mean.
 
RD-BH I'm having a lot of trouble following your argument. You use very little by way of sentences or propositions, just lots of numbers. I really wish you were more verbose, which is something I rarely say to people.

You're obviously very experienced with the practicalities and implementations of an RNG like the one under discussion, probably making you more qualified than any of us here in understanding its problems.

As I go through your last post...
20 Stack (100% chance) vs. 1
Let 100% = 99.5
199:1 odds
Ok, that I can follow.
You propose performing 20 battles all at 99.5% odds (of victory) each. This equates to 199:1 as an odds ratio. Now I begin to see why you talk about magnitude boundaries. There are many magnitude boundaries to cross when you talk about odds in a ratio way. I've grown accustomed to talking about them as fractions of 1, or equivalently percentages out of 100%. So that's why I was so confused as to why you were so worried about magnitude boundaries.

Moving on...
Examples: 20 losing random numbers (sorted)
0000 1111 2222 3333 4444 average w/five numbers
0000 0000 0000 0000 1234 extreme w/five numbers
0000 0000 0000 1111 1234 equation w/five numbers (typical break)
Ok so you've done three "realisations" (or whatever it's called) of a theoretical random variable (TRNG) or pseudo-RNG sampled 20 times.
These are integers out of 1000 I assume, all being below 5 so they are all defeats.

I am not sure about the ends of each line: "average w/five numbers", "extreme w/five numbers","equation w/five numbers (typical break)"
I understand "w/" is "with" but, for example, are you using the term "average" here in loose way and not by its strict mathematical definition where it's the same as the mean (or median under some less common interpretations)?

What do you mean by "five numbers"? What is the "equation" you speak of? What on Earth do you mean by "typical break"? A typical streak as seen from an RNG? I don't understand how this relates to any equation.

999:1 odds a number is generated (in a perfect world)
20/1000 sequence (not all numbers will be generated)
Not sure why we've now changed to 999:1 odds from the earlier 199:1 odds. Doesn't matter though...

What is the 20/1000 sequence? Do you mean you will generate 20 random numbers (from a theoretical perfect RNG) uniformly from 0 to 999? i.e. 20 rolls of a 1000-sided die. And why are not all numbers generated?

We should see roughly 20 numbers +/- magnitude boundaries.
What do you mean here? I read the +/- as meaning literally "plus or minus". What are 20 numbers plus or minus magnitude boundaries? I don't understand, for example, what is meant by a number plus a magnitude boundary! :confused:

20^1/2 = 4..5
20^1 = 20
20^2 = 400
Ok, you're speaking maths - a universal language I'm happy reading. :D

Magnitude Boundaries = 0.224..0.400
This is unclear. Do you mean to say that magnitude boundaries are inside the range 0.225 to 0.4?
If so, how do you even define these magnitude boundaries? I might have been able to work this out if I knew where the 0.224 and 0.4 actually came from - I can't work that out from what I've read.

We expect to observe:
… no more than 5 repeated numbers
… at least 8 unique numbers
#### #012 3456 7??? ????
Ok now we're getting into some hard mathematical propositions. :) (that almost sounds wrong when I read it out loud in an enthusiastic tone :lol:)
I'm not sure where you pulled the two statistics from but I'll take them for granted. I'm guessing that when you say "expected" you mean "average case". Anyway, this doesn't really matter.

#### #012 3456 7??? ????
… (# = 0..7)
… (? = 8..999)
0000 0012 3456 789A BCDE magnitude w/6x0, 15 unique numbers (worst case)
LLLL LLLL LLWW WWWW WWWW 10 Losses, 10 Wins (worst case)
Ok so you have an example of a pretty bad run from the RNG. 10 losses out of 20 at 999:1 odds or 99.9% chance of victory.

Examples: (0 PoV)
Average 4:1 = 0.20, 4/15 unique numbers, 100% loss
Extreme 1:4 = 0.80, 4/15 unique numbers, 100% loss
Equation 2:3 = 0.60, 4/15 unique numbers, 100% loss (typical break)
Magnitude 7:3 = 0.30, 15/15 unique numbers, 50% loss (worst case)

You definitely start to lose me here. However I understand the conversion of odds ratios to fractions of 1.

I'm guessing that in the first one where you say "average" you mean that with the earlier RNG sample (20 rolls) it would work out as all battles lost, because all the numbers from 0 to E (14) are well under 200.

When you get to "Magnitude 7:3" and "15/15 unique and 50% loss (worst case)" I just lose whatever meaning you were trying to get across. Do you mean that it is expected to get 15 unique numbers? Why, by the way, are we not rolling 20 numbers anymore but rather 15?

Also, what's "0 PoV". I understand PoV to mean point of view. What is the 0 point of view? I'm guessing you mean we assume RNG results near 0 are the ones that cause defeats, as opposed to the results near 999 from the RNG.

Only one example is within the magnitude boundaries (0.224..0.400).

Well, I still don't understand what these magnitude bounaries are. Is there a wikipedia article or any reference where I can read the definition? If not I really am going to need something fairly precise by way of a definition.

In a TRNG, magnitude changes are expected.
In a PRNG, magnitude changes suggest equation error (ie distribution).
Why?
… TRNGs and PRNGs differ in magnitude.
… Observing 1000000:1 events on a 1000000000000:1 scale is expected;
… Observing 1000000:1 events on a 100:1 scale is not.

I need an idea of what "magnitude changes" are. Assuming it's literally just changing order of magnitude, which I can understand, then the question instead is: Changes in magnitude of what quantity?
I am not sure what is meant by a X:1 timescale where X is 100, 1000000 or any other number. I'm guessing this is along the lines of: "If we roll a die (doesn't matter how many sides it has) 1000 times then you would not normally expect to observe events that have probability about 1 in a million. On the other hand, rolling a die a million times and you will expect to see events that have 1 in 1000 chane of happening."
Assuming this is what is meant by the two statements, this seems quite obvious and I don't see how that has any relevance or impact on the argument.

I don't know what justification there is for the proposition: "TRNGs and PRNGs differ in magnitude". For starters, I don't know what the magnitude of an RNG is regardless of whether it be true or pseudo.

From your statements, why is it that with a TRNG magnitude changes are expected yet for a PRNG magnitude changes suggest equation error? I thought the purpose of PRNGs is to emulate a true RNG and hence if something is true of TRNGs then if a PRNG has the same property then surely that is a good thing and not something that suggests programmer error.

Summary:
... Given accurate odds:
… ... This is an atypical distribution.

What is an atypical distribution? The sample that you picked and defined to be very atypical? i.e. picking a result that gave 10 out of 20 losses at 99.9% odds.

It probably has a period in excess of 20
What has a period in excess of 20? And do you mean 10^20. What's so special about a period of only 20?

… … ... (it was observed more than once).
… ... It is consistent with known weakness in the chosen RNG.

When was it observed? Are you claiming you saw this result in a game?

As for the known weaknesses of the RNG. Can you please give me a link to a page discussing the weaknesses you are referring to, or any academic literature on the matter. I have heard of weaknesses with the LCG but I have not seen them discussed in depth and I'd like to know where you're getting your information.

***********************

I haven't yet had time to respond to your earlier post and it too had a large number of bits I didn't understand the meaning of. I fear this is going to be a really really painful discussion unless someone comes along and can translate for me what is going on or if you can be a bit more verbose with your explanations. Use sentences, please.

I know it's against forum etiquette to comment on people's grammar but I don't know what else to say here. You're clearly intelligent enough to be talking about these things but your style of writing is unlike anything I've ever seen from any academic or professional. If your native tongue is not English perhaps you can write it in your preferred language and someone can translate it?
 
I wish I just actually won most battles around the 50%-70% range...:badcomp:

First, what do you consider a loss?

I don't figure my attacks with a cat, treb, cannon, or artillery in my win/loss figures. I don't care what the odds are. Any time one of those units survives a battle, I consider it a bonus.

Second, do you have a good memory?

You will tend to remember the two 70% losses, but you will gloss over the 20 90% wins that you had after that 70% loss.

Third, the computer does hate you?

If I see a odds of 65% to 69.9%, I count on the unit losing. For the life of me, it seems like that odds range costs me the most amount of troops. (Go back to my second point)
 
First, what do you consider a loss?

I don't figure my attacks with a cat, treb, cannon, or artillery in my win/loss figures. I don't care what the odds are. Any time one of those units survives a battle, I consider it a bonus.

Second, do you have a good memory?

You will tend to remember the two 70% losses, but you will gloss over the 20 90% wins that you had after that 70% loss.

Third, the computer does hate you?

If I see a odds of 65% to 69.9%, I count on the unit losing. For the life of me, it seems like that odds range costs me the most amount of troops. (Go back to my second point)

I kinda consider siege losses at like half, so I don't really care about those. In about a week, I've lost 3 battles that I've had a 97.7% chance of winning and up.
 
http://en.wikipedia.org/wiki/Riemann_zeta_function
http://en.wikipedia.org/wiki/On_the_Number_of_Primes_Less_Than_a_Given_Magnitude

An example of magnitude:
1) I write a proof of the Riemann Hypothesis that 5th graders can understand.
result:
... I'm dismissed as an imbecile and laughed out of mathematics.
2) I write a proof of the Riemann Hypothesis that peers can understand.
result:
... Only a handful of people on the planet would understand it,
... ... and they are all too busy to read it.

I apologize for adding to the confusion.
I had been up 24 hours when I wrote the report.
... 1) I see a couple typos
... ... "4/15 unique numbers" should read "5/15 unique numbers"
... 2) I referenced a floor, then exampled a ceiling
... ... "magnitude boundaries (0.224..0.400)" probably more meaninful as "range (0.10..0.50)"
... ... (1/X)..(X^1/2)/X
... ... (caution: knowing the origin isn't the same as knowing the significance)
... 3) "+/-" refers to an upper and a lower bound
... 4) bold words are reference labels
... ... average here is just a reminder of uniform distribution (ie 4 of each number)
... 5) "typical break" refers to divergence from typical distribution pattern
... ... your use of "streak" is probably sufficient
... 6) "199:1" was the combat odds
... ... "999:1" is the scale of the RNG (ie producing numbers 0..999)
This equates to 199:1 as an odds ratio. Now I begin to see why you talk about magnitude boundaries. There are many magnitude boundaries to cross when you talk about odds in a ratio way. I've grown accustomed to talking about them as fractions of 1, or equivalently percentages out of 100%. So that's why I was so confused as to why you were so worried about magnitude boundaries.
Percentages are 10^1/2..10^1..10^2; 199:1 is noticeably different from 99:1.

... 7) "20/1000" 20 rolls of a 1000 sided die.
... ... I hate the use of "perfect" in describing a 1:1 distribution across scale.
... ... a) minimum duplication is 1/sample
... ... b) if you observe 0 duplication,
... ... ... you don't have a RNG;
... ... ... you have a lottery.
... 8) The following is revised for clarity:
We expect to observe:
… no more than 5 duplicated numbers
… at least 10 non-duplicated numbers
#### #012 34?? ???? ????
… (# = 0..4) duplicated numbers (losses)
… (? = 5..999) non-duplicated numbers (wins)
0000 0012 3456 789A BCDE magnitude w/6x0, 15 unique numbers, 14 non-duplicated numbers (worst case)
LLLL LLLL LLWW WWWW WWWW 10 Losses, 10 Wins (worst case)
… this is a specific case not a general observation
... 9) The following is revised for clarity:
Examples: (0 PoV)
… 0 PoV = the number of 0s vs. the number of !0s (Not 0s)
Average 4:1 = 0.20, 5/15 unique numbers, 100% loss
… sample shows 4x!0 to 1x0
… 0/10 non-duplicated numbers
... in range for individual duplicates
... out of range for total duplicates
Extreme 1:4 = 0.80, 5/15 unique numbers, 100% loss
… sample shows 1x!0 to 4x0
… 4/10 non-duplicated numbers
... out of range for individual duplicates
... out of range for total duplicates
Equation 2:3 = 0.60, 5/15 unique numbers, 100% loss (typical break)
… sample shows 2x!0 to 3x0
… 3/10 non-duplicated numbers
... out of range for individual duplicates
... out of range for total duplicates
Magnitude 7:3 = 0.30, 15/15 unique numbers, 50% loss (worst case)
… sample shows 7x!0 to 3x0
… 14/10 non-duplicated numbers
... in range for individual duplicates
... in range for total duplicates
... this is the worst case;
... ... you should not observe "streaks" in excess of this
... 10) Magnitude changes in TRNG
... ... This is misleading ... I was trying to be simple.
... ... ... We venture into Heisenberg uncertainty
... ... ... you can't observe a magnitude change in an infinite set
... 11) what quantity?
... ... simple answer: quantity is observer dependent
... ... example:
You are generating sequences of pseudo-random integers 0..999
999:1 odds a number is generated (in a perfect world)
… this is the scale of the RNG
… … 1000^1/2 = 31..32 (precision)
… … 1000^1 = 1000 (scale)
… … 1000^2 = 1000000 (scope)
... ... in a TRNG,
... ... ... scale is infinite
... ... ... analysis is meaningless
... ... ... ... unless it is not a true TRNG
&#8230; as you look closer and closer (<precision),
... ... the observation becomes less meaningful to the scale
&#8230; as you sample larger and larger (>scope),
... ... the observation becomes less meaningful to the scale
&#8230; Expectations:
&#8230; &#8230; uniform distribution of 1000 numbers in 1000000 consecutive numbers
&#8230; &#8230; uniform duplication in 31..32 sample (discrete and/or dynamic)
&#8230; &#8230; &#8230; discrete = integral, dynamic = increment
&#8230; &#8230; all 1000 numbers present in sample range of 1032..1248 (discrete and/or dynamic)
&#8230; &#8230; &#8230; floor((1000*32)/31)..ceiling(1000/(32-ceiling(32^1/2)))*32

Whereas observations outside these boundaries can and do occur,
... 1) their appearance is undesirable.
... 2) their presence is distracting.
... 3) their analysis is meaningless.

FYI: (no attitude intended)
I was reporting the data I observed.
I included possible data ranges that produce the observation.
I wasn't trying to teach a course in mathematics.
Adding notes to the report makes it harder to explain/understand.
... I chose to limit comments and just report the data.
 
Top Bottom