.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 3: The Awakening

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old May 11th, 2008, 06:16 PM
cleveland's Avatar

cleveland cleveland is offline
Captain
 
Join Date: Oct 2007
Location: guess - and you'll be wrong
Posts: 834
Thanks: 33
Thanked 187 Times in 66 Posts
cleveland is on a distinguished road
Default Re: Maths problem: fatigue vs critical hits

Quote:
lch said:
If I'd calculate greater values, the numbers even turn negative!
Negative probabilities? Sounds like my odds the last time I was in Vegas.

Here's roughly what I did:
1) Constructed a vector A(i) of the explicit probabilities for each single drn outcome i. This is pretty straightforward:
A(1)=A(2)=...=A(5)=1/6
A(6)=A(7)=...=A(10)=(1/6)^2
Etc.

2) Constructed a vector B(j) of the probabilities a second drn would be less than or equal to j. So:
B(1)=A(1)
B(2)=A(1)+A(2)
B(3)=A(1)+A(2)+A(3)
Etc.

3) Constructed a matrix M such that M(i,j) = A(i)*B(j). Therefore, each M(i,j) = P(X<=i+j | drn1=i).

4) Summing the / diagonals of this matrix (i.e. all M(i,j) whose i+j are identical) gives the probability that the 2d6oe will be less than or equal to i+j.

So for example, lets take the case when we want the 2d6oe <= 3. This is only possible 2 ways: if drn1=1 & drn2<=2, or if drn1=2 & drn2=1.

We therefore have:
A(1)=1/6
A(2)=1/6

B(1)=1/6
B(2)=2/6

M(1,2)=(1/6)*(1/6)
M(2,1)=(1/6)*(2/6)

So M(1,2)+M(2,1)= 0.083

Of course, this summation becomes larger for larger X=i+j.
When X=7, you'll need to add M(1,6)+M(2,5)+M(3,4)+...+M(6,1).

Phew.
Reply With Quote
 

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 10:00 AM.


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