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

This Month's Specials

winSPMBT: Main Battle Tank- Save $6.00
winSPWW2- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old September 25th, 2007, 12:32 PM

RonD RonD is offline
Second Lieutenant
 
Join Date: Nov 2004
Posts: 449
Thanks: 0
Thanked 3 Times in 2 Posts
RonD is on a distinguished road
Default Re: Suggestion to autocasting search spells

Quote:
thejeff said:

I'd much rather search a Waste site (+20%) that already had 3 sites than a farm (-10%) that had none.

Am I missing something?
Hmmm. Suppose you're searching with Acashic Record and the base chance is 50%.

For the Waste province, the chance to find a site is 70%.

For the Farm, the chance to find 0 sites is 0.6^4 = 13%, so the chance to find 1 or more sites is 87%.

Its more complicated when searching with the individual spells (because the Waste site must have already been searched with some).


I wouldn't have spent any more than 10 seconds working that out, because I seriously doubt we will ever see a complicated auto-search algorithm. The devs prefer to spend time adding cool new content - and that's fine by me.
Reply With Quote
  #2  
Old September 25th, 2007, 12:43 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: Suggestion to autocasting search spells

No, the chance in the Farm is 40%.

It's not 4 separate checks against the percentage. If there is one site, then the code checks to see if there is another one, and so on, up to 4 sites.
If the first check fails, there are no sites there.
Reply With Quote
  #3  
Old September 25th, 2007, 01:15 PM

RonD RonD is offline
Second Lieutenant
 
Join Date: Nov 2004
Posts: 449
Thanks: 0
Thanked 3 Times in 2 Posts
RonD is on a distinguished road
Default Re: Suggestion to autocasting search spells

Quote:
Emily Latella said:
Oh. That's very different.


Never mind.

Reply With Quote
  #4  
Old September 25th, 2007, 02:10 PM

Folket Folket is offline
Major
 
Join Date: Sep 2005
Posts: 1,122
Thanks: 5
Thanked 2 Times in 2 Posts
Folket is on a distinguished road
Default Re: Suggestion to autocasting search spells

I pretty certain that there is four seperate checks for sites.

Try in single player and use the astral spell that searches all sites on all province. You will find that only a few provinces havce zero sites.
Reply With Quote
  #5  
Old September 25th, 2007, 02:51 PM

RonD RonD is offline
Second Lieutenant
 
Join Date: Nov 2004
Posts: 449
Thanks: 0
Thanked 3 Times in 2 Posts
RonD is on a distinguished road
Default Re: Suggestion to autocasting search spells

Quote:
thejeff said:
No, the chance in the Farm is 40%.

It's not 4 separate checks against the percentage. If there is one site, then the code checks to see if there is another one, and so on, up to 4 sites.
If the first check fails, there are no sites there.
It looks like this is not correct. I tweaked Boron's testmap. I took out all the terrain statements (so everything is plains), set ownership for a boatload of provinces to one of the nations (turned out to be 67 provinces total), and used the Seraphs to cast Acashic record on all 67). I created the game with site freq set at 50%.

By your explanation, about 1/2 should have had 0 sites, but here's what I got:

0 sites - 6
1 site - 13
2 sites - 29
3 sites - 17
4 sites - 2
Reply With Quote
  #6  
Old September 25th, 2007, 04:26 PM

Folket Folket is offline
Major
 
Join Date: Sep 2005
Posts: 1,122
Thanks: 5
Thanked 2 Times in 2 Posts
Folket is on a distinguished road
Default Re: Suggestion to autocasting search spells

Wiiieeehh!!

My 670th post.
Reply With Quote
  #7  
Old September 25th, 2007, 04:30 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default A quick intro to Bayes rule

Yeah, there are 4 50% chances to have a site, which is why the average is 2.

A brief explanation of what order to search in:
Let us pretend that each province has 2 50% chances to have a site, of which half will be fire sites and half will be earth sites.

So, if we look at 160 provinces:
40 will have no sites.
40 will have one fire site.
40 will have one earth site.
20 will have one earth site and one fire site.
10 will have two fire sites.
10 will have two earth sites.

Now, we've done some earth searching, and we want to know: which provinces should we search for fire?
a) Sites which haven't been searched are expected to have: (40 + 20 + 10 * 2) / 160 = 0.5 fire sites each.
b) Sites which have been searched, and which contained two earth sites, have 0 fire sites each (guaranteed).
c) Sites which have been searched, and which contained one earth site are expected to have: 20 / (20 + 40) = 1/3 fire sites each.
d) Sites which ahve been searched, and which contained zero earth sites, are expected to have: (40 + 10 * 2) / (40 + 40 + 10) = 2/3 of a fire site each!

So category B is not worth searching at all.
Category D > Category A > Category B.

This is a particular case of the well-known "Monty Hall" paradox:
http://en.wikipedia.org/wiki/Monty_Hall_problem
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
  #8  
Old September 25th, 2007, 05:55 PM

thejeff thejeff is offline
General
 
Join Date: Apr 2005
Posts: 3,327
Thanks: 4
Thanked 133 Times in 117 Posts
thejeff is on a distinguished road
Default Re: A quick intro to Bayes rule

Apparently I was misled by comments from the devs. The game is complex enough, not even they understand it anymore.

I'm not entirely convinced by the (correct) Monty Hall argument.
Largely because of the terrain modifiers. Provinces with multiple sites are more likely to be in terrain with better chances and thus may still have a better chance of more.
Waste with 2 sites or farmland with none?

More importantly, I really care less about the order they're searched in. I don't want to have to come back and check for skipped provinces once the autosearching is done. Once that's hashed out, tweaking for the most efficient order would be appreciated, but I won't really care.
Reply With Quote
  #9  
Old September 25th, 2007, 08:29 PM
DrPraetorious's Avatar

DrPraetorious DrPraetorious is offline
Major General
 
Join Date: Feb 2005
Location: Lake of Hali, Aldebaran, OH
Posts: 2,474
Thanks: 51
Thanked 67 Times in 27 Posts
DrPraetorious is on a distinguished road
Default Re: A quick intro to Bayes rule

I agree with thejeff 100%.

The only requirement is that the site-searching algorithm should be good-enough that you don't bother by hand.

I'd propose "priority score" like (4 - sites found) * (4 - level in this path searched)^2, and never searching anything with a score of 0.

The issue with non-standard terrains is that, *I BELIEVE*, they have a linear effect on the site frequency.

If the site frequency is 75%, it's 65% in farmland and 85% in swamps, *I THINK*, and who cares?

OTOH, if the site frequency is 30%, sites are twice as frequent in swamps and that makes a big difference.
__________________
If you read his speech at Rice, all his arguments for going to the moon work equally well as arguments for blowing up the moon, sending cloned dinosaurs into space, or constructing a towering *****-shaped obelisk on Mars. --Randall Munroe
Reply With Quote
  #10  
Old September 26th, 2007, 01:52 AM

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: A quick intro to Bayes rule

Hmm... interesting. With that priority score above...

0/0 = 64
1/0 = 48
2/0 = 32
3/0 = 16

0/1 = 36
1/1 = 27
2/1 = 18
3/1 = 9

0/2 = 16
1/2 = 12
2/2 = 8
3/2 = 4

0/3 = 4
1/3 = 3
2/3 = 2
3/3 = 1

#/4 = 0
4/# = 0

So, the very lowest priority is hunting for ultra-rare level 4 sites. Fine, that. I don't like the rest of it because its not very intuitive. But I do like the results, even if I can't predict where it'll search easily. But the auto searching isn't about predicting anyways. The way the numbers fall is fine enough by me.

I would put in a few additional variables. For Dark Knowledge, for instance, I would heavily favor land provinces over water provinces, though there are a few possibilities...

As there are currently zero underseas blood sites in the game, I'd set the priority to something like 1, (if I boosted all other scores by one, so this would be the lowest). This would allow mod-sites to be found eventually, while keeping in mind nothing will likely ever be found underwater - and they'd be searched dead last.
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 09:55 PM.


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