.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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old October 10th, 2006, 09:53 PM

Wick Wick is offline
Sergeant
 
Join Date: Oct 2003
Posts: 262
Thanks: 1
Thanked 0 Times in 0 Posts
Wick is on a distinguished road
Default Re: Ritual/site searching questions

This is the site searcing algorithim I'd use. I doesn't check strategic considerations because that's hard. It also doesn't factor that existing searches in other paths improve the odds because I've forgotten the proof that it does.

I've used variables instead of numbers so numberOfPaths = 9 (including Holy), maxSlots = 4 etc. and if the rest isn't obvious then I haven't done it right:

for i = 1 to provinces
if provinceControl(i) = player then
for j = 1 to numberOfPaths
if searchingLevel(j) > 0 then
searchedLevel = withDeclaredSearchers(i, player)
if searchingLevel(j) > searchedLevel then
slotvalue = 0
for k = 1 to (maxSlots - knownSites)
slotValue = slotValue + (baseChance + terrainChance)^j * (searchingLevel - searchedLevel)
next k
endif
endif
searchValue(i) = searchValue(i) + slotValue
next j
endif
next i

Then search the most valuable province.
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 05:07 AM.


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