.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

Reply
 
Thread Tools Display Modes
  #21  
Old November 15th, 2007, 03:18 PM

VedalkenBear VedalkenBear is offline
Second Lieutenant
 
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
VedalkenBear is on a distinguished road
Default Re: Site Searching Statistics Questions

Thejeff: Sorry, the 1-(P of not Earth) was supposed to be not Astral.

The 'if not searched' value included the probability in the Astral analysis that an Earth site could be any one of the remaining sites (that is, the probability of the site NOT being Astral was 8/9). If Earth was searched (at level 4 or 9), then the probability that the sites could be Astral would be 1/8, not 1/9. The slightly higher value takes this into account. (I had this value at hand because I initially forgot Holy sites, and therefore had done all the calculations for 1/8 instead of 1/9.)
Reply With Quote
  #22  
Old November 15th, 2007, 03:19 PM
Edi's Avatar

Edi Edi is offline
National Security Advisor
 
Join Date: Oct 2003
Location: Helsinki, Finland
Posts: 5,425
Thanks: 174
Thanked 695 Times in 267 Posts
Edi is on a distinguished road
Default Re: Site Searching Statistics Questions

Probability mathematics make my head hurt. That is all.
Reply With Quote
  #23  
Old November 15th, 2007, 03:25 PM

VedalkenBear VedalkenBear is offline
Second Lieutenant
 
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
VedalkenBear is on a distinguished road
Default Re: Site Searching Statistics Questions

Oh, I'm using the binomial not the hypergeometric. The binomial probabilities are simply the probabilities of a given number of sites in a province. These states are not dependent on one another. If the site placement algorithm checked for a first site, found none, and _did not check anymore_, that would be conditional probability.

Basically, for the second calculation you have:

0 sites in province (trivial case): 0
1 site in province (also trivial): 0
2 sites in province, 1 is earth, chance that the second is earth: Probability that there are two sites in province * 1-(Probability that the first is not Astral(1)*Probability that the second is not Astral(0.875) = 0.3456*(1-(1*0.875)

And so on. If the probabilities change given one state, that means the probabilities are conditional. The only way for that to happen in this case would be if the site search algorithm were to stop checking for sites if any check failed. That AFAIK does not happen.
Reply With Quote
  #24  
Old November 15th, 2007, 03:28 PM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Site Searching Statistics Questions

Quote:
VedalkenBear said:
Or an 7.83% chance of finding an Astral site in a province that already has another Earth site, _provided you did not search for the Earth site_. If you did, then it is 0.0876, or an 8.76% chance.
Okay, this does sound wrong. As said before, the sites that are in a province are determined when the game starts, not when a site search is being made. Either there is a specific site in a province or there isn't. What you're dealing with regarding to statistics is in which of the five possible scenarios zero/one/two/three/four sites in the province you are and then if you picked the right path which covers one of these sites. Unless you found any sites, all these five scenarios go into your equation to find a site or not. So there's a 20% chance for that specific scenario and then tied to that a xx% chance to find a new site. These xx% chances from the different scenarios add up. Once you found some sites, you cancel out those chances from the scenarios that are no longer possible, so the overall probability to find a new site goes down. I hope that this makes any sense.
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote
  #25  
Old November 15th, 2007, 03:39 PM

VedalkenBear VedalkenBear is offline
Second Lieutenant
 
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
VedalkenBear is on a distinguished road
Default Re: Site Searching Statistics Questions

Ich: Actually, there isn't a 20% chance for each scenario. There is a 0.4 probability of a site being placed, with a maximum of 4 sites being able to be placed. This is a pure binomial distribution. Even in the case of 0.5 probability, there isn't a flat chance.

I agree that they are determined when the game starts. However, we cannot look at a province and tell how many sites are in it. Therefore, we must take into account the various probabilities regarding the number of sites.

Once that is done, you have the scenario I described in my initial post. To go over it again:

If there are 0 sites in a province, and you search for an Earth site, the probability that you will find an Earth site is 0.

If there is 1 site in a province, and you search for an Earth site, the probability that you will find an Earth site is 1/9. (Assuming equal probabilities)

If there are 2 sites in a province, and you search for an Earth site, the probability that you will find at least one Earth site is the probability that both sites are not Earth sites, subtracted from 1.

etc.

Now, those are all _conditional_ probabilities. Since the events are independent (the number of sites does not affect the types of sites), the total probability is the product of the two. Therefore, the probability of one site (0.1296) multiplied by the probability that the site is an Earth site (0.1111) will be the probability of their being one site in the province AND that site being Earth.

Since we do not know the number of sites in the province, we must find the probabilities of each case, and then sum them to find the overall probability of finding at least one Earth site in a province when we search it. That is the probability I gave you.
Reply With Quote
  #26  
Old November 15th, 2007, 03:57 PM

Evilhomer Evilhomer is offline
Captain
 
Join Date: Nov 2006
Location: Sweden, Ume�
Posts: 991
Thanks: 5
Thanked 1 Time in 1 Post
Evilhomer is on a distinguished road
Default Re: Site Searching Statistics Questions

I finally decided to be math geeky, so here goes:

Binomical distribution GIVEN 1 site is earth (when we entered province // no searches done).

sites - probability
0 - 0.000
1 - 0.216
2 - 0.432
3 - 0.288
4 - 0.064

Chance of finding one or more astral sites using a level 9 search spell (assuming all types of sites have the same probability, not true but whatever...)

P(2)*(chance of 1+ astral site=1/8)+P(3)*(chance of 1+ astral site=15/64)+P(4)*(chance of 1+ astral site=169/512)

=

0.143 (or 14% if you wish)

So the chance decreases, but not by as much as reported by valkenbear. Same calculation provided that we have searched using gnome lore (and found 1 site) will follow..

*Note the "chance of 1+ astral site" changes, being 1/8 in the first bracket and (1/8*7/8)+(7/8*1/8)+(1/8*1/8)=15/64 in the second bracket, and so forth
__________________
MP guide to MA/LA Rlyeh
Reply With Quote
  #27  
Old November 15th, 2007, 04:00 PM
lch's Avatar

lch lch is offline
General
 
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
lch is on a distinguished road
Default Re: Site Searching Statistics Questions

Yeah, my bad about the zero/one/two/three/four being equally possible. That was simplifying it too much, although I wouldn't want to do this in a full detail analysis which would include at which level you searched for the sites already, what terrain we have, etc. - this can get overly complicated.

What's only important: How many sites there are (a random variable), how many sites we found already and how much we searched already / how many search possibilities are left.
__________________
Come to the Dom3 Wiki and help us to build the biggest Dominions-centered knowledge base on the net.
Visit my personal user page there, too!
Pretender file password recovery
Emergency comic relief
Reply With Quote
  #28  
Old November 15th, 2007, 04:08 PM

VedalkenBear VedalkenBear is offline
Second Lieutenant
 
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
VedalkenBear is on a distinguished road
Default Re: Site Searching Statistics Questions

May I ask how you found that new distribution, Evilhomer? I think I see where you're going, but I'm missing that part. (And I am mildly affronted at the fact that you call this 'math geeky'. This is what I'll be doing for a living soon.)
Reply With Quote
  #29  
Old November 15th, 2007, 04:14 PM

Lazy_Perfectionist Lazy_Perfectionist is offline
Lieutenant Colonel
 
Join Date: May 2007
Posts: 1,355
Thanks: 0
Thanked 5 Times in 4 Posts
Lazy_Perfectionist is on a distinguished road
Default Re: Site Searching Statistics Questions

I beat a hasty retreat before the math. I yield the field rather than suffer an ignominious defeat. I'll be watching from the sidelines, though.
Reply With Quote
  #30  
Old November 15th, 2007, 04:21 PM

VedalkenBear VedalkenBear is offline
Second Lieutenant
 
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
VedalkenBear is on a distinguished road
Default Re: Site Searching Statistics Questions

LP: Aw, that doesn't help. I need people to catch me on stuff.
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 01:35 AM.


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