.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old February 19th, 2005, 04:56 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
Ivan Pedroso said:
"20 sages in a row - exactly 1 path missing":
(7/8)^20 *8 = 0.554

Explanation:
the (7/8) is the chance of getting one of the 7 "good" paths when you hire a sage.
^20 is just 20 such sages in a row.
*8 stems from the fact that you can choose your pool of 7 "good" paths from the 8 possible paths in 8 different ways.

7/8 probability means that you will get one of a "good" paths, but repeating the roll 20 times does not guarantee that you'll get each of "good" paths at least once. Thus 7/8 ^ 20 is probability of missing "bad" path (and maybe some of the "good" paths), not one path exactly. If you write your 20 random picks, using digits from 0 to 7 to indicate different paths, 8^20 is a total number of possible numbers (outcomes). Not getting one particular path means getting number without particular digits. There's total of 7^20 such digits. However, there're numbers like 111...1, 222...2 etc amongst them. Those numbers indicate outcomes where 7 paths are missing. Other numbers will represent outcomes with various number of paths missing.

Quote:
Ivan Pedroso said:
General formula:
(chance of one good)^(number in a row) * (ways to make a good pool)

Getting 20 in a row without exactly 2 paths:
(6/8)^20 * 28 = 0.0888
(28=(8!)/(6!2!) is the number of ways of taking 6 from a sample of 8)

Same problem as above, it's probability of missing 2 paths or more.

Quote:
Ivan Pedroso said:
Getting 20 in a row with 1 or more paths missing:
~65%

Surprisingly high ? or ?
Reply With Quote
  #2  
Old February 19th, 2005, 06:11 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default Re: Random Magic Paths - is it truly random?

Based on his knowledge of statistics he made an estimate, thats what the ~ is for.

The exact value is given by
((7/8)^20 * 8c7) + ((6/8)^20 * 8c6) + ((5/8^20 * 8c5) + . . . + ((1/8^20 * 8c1) = .647163

If he didn't figure it out exactly he's a pretty good guesser.

And he did say it properly:

Probability of not getting 1 or more paths after recruiting 20 random paths.

*8c5 = 8 combinataion 5 (ways to get 5 out of 8 with replacement) = 8!/5!3!
Reply With Quote
  #3  
Old February 19th, 2005, 07:54 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
BigDaddy said:
Based on his knowledge of statistics he made an estimate, thats what the ~ is for.

The exact value is given by
((7/8)^20 * 8c7) + ((6/8)^20 * 8c6) + ((5/8^20 * 8c5) + . . . + ((1/8^20 * 8c1) = .647163

What I said is that the formula is wrong and so the result was off by about 18%.

Quote:
BigDaddy said:
If he didn't figure it out exactly he's a pretty good guesser.

And he did say it properly:

Probability of not getting 1 or more paths after recruiting 20 random paths.

That was said right, only the result was wrong it's approximately 47%, not 65%.

If you've missed my point, consider the case of getting random out of 3 magic paths and doing just 3 rolls. Ivan's formula gives (2/3)^3*3c2 + (1/3)^3*3c1 = 3*8/27 + 3/27 = 27/27 = 1 - probability of missing 1 or more paths, which is clearly wrong because you have positive probability of getting 3 different paths in 3 rolls.

Note. Number of combinations of N out of M is notorious for having many different notations (like McN, C(N,M) (M,N) etc). So we're all talking about the same coefficients
Reply With Quote
  #4  
Old February 19th, 2005, 06:28 PM

Ivan Pedroso Ivan Pedroso is offline
Corporal
 
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Ivan Pedroso is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

@Alexti

Ahhhh yeah - that was sloppy.

(7/8)^20*8 is NOT the probality of getting exactly one path missing. You are absolutely right about it not garanteeing that the other 7 paths are present.

Back when I have had time for a better look (sorry 'bout posting too hastilly )
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote
  #5  
Old February 19th, 2005, 08:00 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
Ivan Pedroso said:
@Alexti

Ahhhh yeah - that was sloppy.

(7/8)^20*8 is NOT the probality of getting exactly one path missing. You are absolutely right about it not garanteeing that the other 7 paths are present.

Back when I have had time for a better look (sorry 'bout posting too hastilly )
Curiously enough, the correct formula (I'm 99% sure ) looks very much like yours, only the sign alternates (see my earlier post, coefficients are the same, only the sign is different).
Reply With Quote
  #6  
Old February 19th, 2005, 09:25 PM

Ivan Pedroso Ivan Pedroso is offline
Corporal
 
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Ivan Pedroso is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
alexti said:
Quote:
Ivan Pedroso said:
Back when I have had time for a better look (sorry 'bout posting too hastilly )
Curiously enough, the correct formula (I'm 99% sure ) looks very much like yours, only the sign alternates (see my earlier post, coefficients are the same, only the sign is different).
Yeah - your initial formula is correct. But I must admit that it could do with some explanations. I looked at it (briefly, I'll admit) and could not see what it all meant, or what the idea behind the factors and numbers were. And when I saw that p(i)=0 for i=8 I just disregarded the whole thing and wrote up my (wrong) ideas. (now I get it, and that p(8)=0 is perfectly fine. It's the probability of getting 20 sages in a row with eight(!) paths missing - zero of cause.)

The alternating signs are introduced when probabilities of non-independent events are added.

Same as when non-disjoint sets are unified:

U(A,B) = A + B - I(A,B)
U: unified
I: intersection (written as an upside-down "U")

With 3 sets A,B, and C you get:
U(A,B,C) = A + B + C - I(A,B) - I(A,C) - I(B,C) + I(A,B,C)

With 8:
U(all eight) = A + B + ... + H - I(all with two) + I(all with three) - I(all with four) and so on with plus and minus alternating between the groups of intersections.

One of the ones in the group called I(all with four) could be: I(A,B,C,D) or I(A,B,D,F) or ... well anyone with four letters

- - - - we'll use the above stuff now - - - -

"A" above could mean no FIRE pick in 20 sages in a row. "B" no AIR and so on.

Then U(A,B,C,D,E,F,G,H) is all the sets that can be constructed with 20 sages where any one path is missing.

P(getting one of the sets in U(A,B,C,D,E,F,G,H)) is then the probability of getting a row of 20 sages with any one path missing. But as Alexti said, if you add together P(A)+P(B)+ ...+P(H) you will NOT get P(getting one of the sets in U(A,B,C,D,E,F,G,H)).
Because P(A) is the the probability of getting 20 sages without seeing any FIRE paths. But a series of 20 with all sorcery paths will then be a part of A, B, C, and D and would thus get counted 4 times instead of only once. The alternating signs ensures that these "extra countings" gets added and deducted correctly, in order to only count the relevant contributions once. The above describes how P(getting one of the sets in U(A,B,C,D,E,F,G,H)) should be calculated.

P(A) = (7/8)^20 (so are P(B) and P(C) and so forth)
so the first part (the one with A + B + C...) is thus:
8*(7/8)^20

P( I(A,B) ) = (6/8)^20 (and so are P( I(A,C) ) and bla bla)
the re are 28 ways to make these parings, so the second part is:
- 28*(6/8)^20

The third part is ( 8!/(5!3!)=8*7*6/(3*2)=56 ways to combine three letters from the eight available):
+ 56*(5/8)^20

And so on and so on... resulting in:
((7/8)^20 * 8c7) - ((6/8)^20 * 8c6) + ((5/8^20 * 8c5) - . . . + ((1/8^20 * 8c1) = 0.4694

As stated by Alexti and misunderstood by me, but now hopefully clear to all
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote
  #7  
Old February 19th, 2005, 11:40 PM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default Re: Random Magic Paths - is it truly random?

That equation looks very familiar, but I've misplace my book... (not my advance statistics books with all their distributions and tests, just the basic one).

Anyway, for anyone who stumble across this with some arcane pattern and thinks it might not be random, remember that radomness is elusive even to statisticians. Understanding randomness could be likened to understanding the actual magnitude of infinite. We can use it and test it, just like infinite, but our perception of it will never be quite accurate. So, consider a random number off of an infinitely long number line. . .
Reply With Quote
  #8  
Old February 20th, 2005, 12:52 AM
bone_daddy's Avatar

bone_daddy bone_daddy is offline
Private
 
Join Date: Jan 2005
Location: Indiana, USA
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
bone_daddy is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

So, does this have to do with true randomness not being possible within a system containing a limited number of variables?
Reply With Quote
  #9  
Old February 20th, 2005, 02:57 AM
BigDaddy's Avatar

BigDaddy BigDaddy is offline
Second Lieutenant
 
Join Date: Feb 2005
Location: Central Illinois
Posts: 434
Thanks: 7
Thanked 3 Times in 3 Posts
BigDaddy is an unknown quantity at this point
Default Re: Random Magic Paths - is it truly random?

A computer can never make really random numbers, a computer scientist has ensured me that that is the case as I believed it was. Instead it uses the clock to produce seemingly random numbers. The numbers themselve seem very much random, in fact, you could call them "virtually random".

True randomness is a rather complicated term, but according to my text randomness is part of anything who's probability of occurence or omission is <100%. So, I'd say that the probability of failure of a device, or the probability of throwing heads on a coin are still random, regardless of their distribution. Distributions just describe some specific random systems. So, I'd have to say no. It's just easier to feel you've grasped random with a coin flip.

Considering a random point on an infinitely long numberline is just a good way to illustrate a humans inability to truly understand certain concepts. Cosider a point on a numberline, if you take an infinitely small movement from that number to any other position on that numberline, there are an infinite number of uniques points between the first and the second, until the movement = 0.

Similarly, we make do with random models and distribution that resemble the things we can test. So, consider this, the probability of flipping heads or tails on a coin 1000 times is 9.3326E-302. IF the coin is flipped an infinite number of times, the probability of this occuring is 1.

In this example we have a demonstration of true randomness, with only two choices (heads or tails).
Reply With Quote
  #10  
Old February 20th, 2005, 12:38 AM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Quote:
Ivan Pedroso said:
Yeah - your initial formula is correct. But I must admit that it could do with some explanations.

Thanks for the explanation why my formula is obvious Indeed, that's where it comes from. It reminds me of my teacher in the university who was used to say "and obviously *something* follows". After it would take me couple of hours to figure out why it was obvious

Quote:
Ivan Pedroso said:
I looked at it (briefly, I'll admit) and could not see what it all meant, or what the idea behind the factors and numbers were. And when I saw that p(i)=0 for i=8 I just disregarded the whole thing and wrote up my (wrong) ideas. (now I get it, and that p(8)=0 is perfectly fine. It's the probability of getting 20 sages in a row with eight(!) paths missing - zero of cause.)

In general case, formula is
Code:

p=sum[i=1..m]((-1)^(i+1)*C(i,m)*p(i)), where p(i)= ((M-i)/M)^N


where M is a number of picks and m <= M is number of picks in a subset, so the formula gives the probability of missing one (or more) of the paths out of subset of m paths.
I've just substitued 8 for m and M for our case, which produced curious p(8)=0
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.