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

This Month's Specials

ATF: Armored Task Force- Save $8.00
War Plan Pacific- Save $8.00

   







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

Reply
 
Thread Tools Display Modes
  #1  
Old April 18th, 2008, 07:42 PM

PyroStock PyroStock is offline
Corporal
 
Join Date: Dec 2004
Posts: 138
Thanks: 1
Thanked 1 Time in 1 Post
PyroStock is on a distinguished road
Default Does My Site Search Mage Know Something I Don\'t?

I conquer province#90 and province#10 (furthest south & lowest # province I own). #10 has 2 magic sites found by the previous owner (an AI). When I attempt to site search with any mage they don't automatically target #10 and will either target another or ignore it as if it's already been searched.
Is this a bug or ?
Reply With Quote
  #2  
Old April 18th, 2008, 07:52 PM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: Does My Site Search Mage Know Something I Don\'t?

There was athread about this recently. The mages don't want to search provinces with two or more sites.
Reply With Quote
  #3  
Old April 18th, 2008, 08:34 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: Does My Site Search Mage Know Something I Don\'t?

And, well, they sort of _do_ know something you don't. The distribution of sites in a province can be adequately modeled with the binomial distribution, with the following numbers for probabilities in the case of Middle Era default:

0 - 0.1296
1 - 0.3456
2 - 0.3456
3 - 0.1536
4 - 0.0256

The chances that a province will have greater than 2 sites is only 0.1792, and so the computer is programmed to avoid those sites in favor of those provinces that have fewer sites.

It would be nice to see this implementation enhanced to work for specific terrain types, or to simply give the player the choice of threshold.
Reply With Quote
  #4  
Old April 19th, 2008, 02:53 PM

Loren Loren is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
Loren is on a distinguished road
Default Re: Does My Site Search Mage Know Something I Don\'

Quote:
VedalkenBear said:
And, well, they sort of _do_ know something you don't. The distribution of sites in a province can be adequately modeled with the binomial distribution, with the following numbers for probabilities in the case of Middle Era default:

0 - 0.1296
1 - 0.3456
2 - 0.3456
3 - 0.1536
4 - 0.0256

The chances that a province will have greater than 2 sites is only 0.1792, and so the computer is programmed to avoid those sites in favor of those provinces that have fewer sites.

It would be nice to see this implementation enhanced to work for specific terrain types, or to simply give the player the choice of threshold.
What I would like to see is that all site-searching spells auto-target the province with the highest odds of finding a site, but that they target all provinces where a site could be found even if they have already been searched by a low-level mage. The info on the mage should say what the odds are for the current cast.
Reply With Quote
  #5  
Old April 19th, 2008, 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: Does My Site Search Mage Know Something I Don\'

I can see if I can come up with an algorithm. Don't ask me to code it, though.
Reply With Quote
  #6  
Old April 19th, 2008, 04:17 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: Does My Site Search Mage Know Something I Don\'

Pyrostock, this is the thread you are looking for. It has links to an earlier thread where some more mechanics are discussed too.
Reply With Quote
  #7  
Old April 20th, 2008, 02:38 PM

Loren Loren is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
Loren is on a distinguished road
Default Re: Does My Site Search Mage Know Something I Don\'

Quote:
VedalkenBear said:
I can see if I can come up with an algorithm. Don't ask me to code it, though.
Who needs an algorithm for this?? I wouldn't bother to write one! Making it fast is asking for bugs and one shouldn't calculate what one can look up anyway.

Search level 4 or sites found 4 = skip.

We have 0-3 sites found, a few terrain types, the previous search level (0-3) and the path. Simply store all the precalculated values. I don't think it's more than 10k of data.

The only troublesome cases are the multiple-search spells. My impression is that simply summing the probabilities for all paths they cover would produce an appropriate ranking even though the probability number itself is obviously way wrong.
Reply With Quote
  #8  
Old April 20th, 2008, 04:34 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: Does My Site Search Mage Know Something I Don\'

Loren: Finding which province is the current best site to search with a given search spell is _not_ that simple, given all the criteria involved.

More linear programming, whee!
Reply With Quote
  #9  
Old April 20th, 2008, 08:00 PM
vfb's Avatar

vfb vfb is offline
General
 
Join Date: Mar 2007
Location: Japan
Posts: 3,691
Thanks: 269
Thanked 397 Times in 200 Posts
vfb is on a distinguished road
Default Re: Does My Site Search Mage Know Something I Don\'

Well, here's a really simple algorithm that would be better than the current one IMO.

Maintain a CurrentSearch list of sites being searched in current month.

Code:

* Loop through owned sites to find next province to search:
- Capitol? Discard.
- 4 sites known? Discard.
- In CurrentSearch? Discard.
- Rank =
100 * (4 - (current search path level searched in province)
+ 10 * (4 - (# of known sites))
+ (total of other paths already searched in province)
- Rank < CurrentRank? Discard.
- CurrentRank = Rank, add to CurrentSearch list



Needs some modification to handle Tiamat, but so does the current search.
__________________
Whether he submitted the post, or whether he did not, made no difference. The Thought Police would get him just the same. He had committed— would still have committed, even if he had never set pen to paper— the essential crime that contained all others in itself. Thoughtcrime, they called it. Thoughtcrime was not a thing that could be concealed forever.
http://z7.invisionfree.com/Dom3mods/index.php?
Reply With Quote
  #10  
Old April 20th, 2008, 10:16 PM

Loren Loren is offline
First Lieutenant
 
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
Loren is on a distinguished road
Default Re: Does My Site Search Mage Know Something I Don\'

Quote:
VedalkenBear said:
Loren: Finding which province is the current best site to search with a given search spell is _not_ that simple, given all the criteria involved.

More linear programming, whee!
I don't understand why it can't be precalculated for the single-path spells. If the programming gets too hairy don't bother, just monte-carlo it. Make a billion provinces and search them (standalone code, not in the game), see what happens. With modern CPU's that wouldn't take that long.
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 05:09 AM.


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