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

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







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

Reply
 
Thread Tools Display Modes
  #81  
Old February 18th, 2005, 06:07 PM

Turms Turms is offline
Corporal
 
Join Date: Jan 2004
Location: Finland
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Turms is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

Sorry, It was me who overreacted.

Turms
Reply With Quote
  #82  
Old February 19th, 2005, 01:30 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:
Saber Cherry said:
Furthermore, unless I'm just up too late and should really go to bed now (probably true), it seems that the chances of 20 random picks missing a least one path (in other words, getting 20 consecutive sages and still not having 8 paths between them) is 43.6%, which is relatively high. Math:

1-((1-.0692)^8), where the .0692 is derived from the same calculation as above.

0.0692 is probability of not getting particular path. Then 1-0.0692 is probability of getting that particular path. Then you consider that events of getting/not getting some path are independent from each other. But those events are not independent. Consider, that your first event (getting blood path has happened on your serie, but that serie happened to have astral too). This makes the probability of your second event (getting astral) = 1, not 1-0.0692.

Code:

p(missing at least one of the paths) =
= p(missing path A) + p(missing path B) - p(missing path A and path B) + p (missing path C)+ ... =
= sum[i=1..8]((-1)^(i+1)*C(i,8)*p(i)), where p(i)= ((8-i)/8)^20.


This comes to around 46.94%, which is even "relatively higher"
Reply With Quote
  #83  
Old February 19th, 2005, 03:36 PM
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 has anybody here managed to create an infinite improbability drive yet?
Reply With Quote
  #84  
Old February 19th, 2005, 04:11 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:
BigDaddy said:
Thats funny because i'm not bone daddy and Ivan's posts where nerdier. No offense intended Ivan.
Hehehe none taken

"20 sages in a row with 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.

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

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

Getting 20 in a row with 1 or more paths missing:
~65%

Surprisingly high ? or ?
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote
  #85  
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
  #86  
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
  #87  
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
  #88  
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
  #89  
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
  #90  
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
Reply

Bookmarks


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 04:41 PM.


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