View Single Post
  #3  
Old June 12th, 2007, 01:44 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: ritual site search bug/feature request

If you're going to make the search math more complicated at all, it might as well generate a priority array of provinces each turn, and crawl through that list in descending order.
I'm just guessing about how this works and then writing in C to get what I mean accross.

Code:

for (prov = 0; prov < num_prov; prov++){
if (owners[prov] == currentplayer){

slevel = map.sitefrequency + sitefrequencyadjust(terrain[site]);

for (i = const_FIRE; i <= const_HOLY; i++){
/* If a site has been searched for one type and nothing has been found, chances of seeing something of another type go up. http://www.stat.sc.edu/~west/javahtm...MakeaDeal.html
Also Bayesian inference generally. This is not strictly the right adjustment. */
slevel += currentsearch[currentplayer][prov][i] * 25 / 7;
}

for (i = const_FIRE; i <= const_HOLY; i++){
spri[prov,i] = slevel * (4 - knownfeatures[i]);
spri[prov,i] /= exp(2,currentsearch[currentplayer][prov][i]);
/* This assumes that half of the sites are level 1, a quarter are level 2, etc. */
if (currentsearch[currentplayer][prov][i] >= 4){spri[prov,i] = 0;}
/* And of course no sites are above level 4. */
}

if (isForest(prov)){spri[prov,const_NATURE]*=1.2;}
if (isMountain(prov){spri[prov,const_EARTH]*=1.2; spri[prov,const_AIR]*=1.1;}
if (isWater(prov){spri[prov,const_WATER]*=1.2;}
if (isSwamp(prov){sprit[prov,const_DEATH]*=1.2; spri[prov,const_WATER]*=1.1; spri[prov,const_NATURE]*=1.1;}
if (isWaste(prov){sprit[prov,const_DEATH]*=1.1; spri[prov,const_FIRE]*=1.2;}
}
}



And then you sort the province #s according to their priority for each given search type. For Akashic Record or Voice of Tiamat, just some the priorities before sorting.

If someone wants to do a statistical analysis of Edi's site list and get real values... actually I'm probably the only person here who'd want to do that.
__________________
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