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

This Month's Specials

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

   







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

Reply
 
Thread Tools Display Modes
  #11  
Old September 25th, 2007, 12:00 PM

Sombre Sombre is offline
BANNED USER
 
Join Date: Feb 2007
Posts: 5,463
Thanks: 165
Thanked 324 Times in 190 Posts
Sombre is on a distinguished road
Default Re: Suggestion to autocasting search spells

Quote:
llamabeast said:
How are you always fighting South?
Just unlucky I guess. It's annoying you can't switch the direction around.
Reply With Quote
  #12  
Old September 25th, 2007, 12:04 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

I don't understand the desire to prioritize searches of provinces with no known sites.

The site placing algorithm, as I understand it is:
roll %chance of site
if yes, determine which site then roll again
if no then exit.

Max of 4 sites, but the point is, if there you know there is one site, the chances of another site are just as good as when you didn't know of any.

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?
Reply With Quote
  #13  
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
  #14  
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
  #15  
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
  #16  
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
  #17  
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
  #18  
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
  #19  
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
  #20  
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
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:34 PM.


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