View Single Post
  #20  
Old May 9th, 2004, 09:10 PM

delacroix delacroix is offline
Private
 
Join Date: Jan 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
delacroix is on a distinguished road
Default Re: SUGGESTION: AI castle building algorithm

To take the fort-building suggestion in a slightly different direction, (maybe it will spur someone's creativity), is anyone complaining about the temple building algorithm the AI has? If not, wouldn't it be possible to modify the temple building AI into a temple-or-fort building AI? As in, if the temple check passes but too many temples exist, start to focus on forts? If no suitable fort location is found, then revert back to building a temple this turn. That could answer the "when" to build a fort, and "how" to accumulate resources for the fort. My post doesn't deal with "where" the fort should be built, others have proposed options for that.

But if the AI can afford to build 200gc temples, it can afford to build a 250gc fort. And if it can afford to build 2 temples over a span of a couple turns, it certainly could have instead afforded to build the 450gc castle, and so on...

I don't know how the temple-building AI works exactly, whether it only builds temples when it has the 200gc at the start of the turn, or whether it saves the 200 over the course of many turns. Either could be adapated to fort-building. In the latter you just save over more turns, in the former you can just store/save 200gc (or 250 would be a better option for the initial save) until enough money is accumulated to build that fort.

The temple building AI is rather decent at getting the job done, so it handles a lot of cases by itself. Early game it takes a while for the AI to build their temples, so the forts would naturally come after a certain proportion of temples were built. And the AI would start to build a fort or two when it hit that time period where the AI starts to fill up every province with a temple (IMO this is about the prime time when forts should be appearing). However, late-game if an AI was conquered to only a few remaining provinces and had a temple in each, the building-AI would say 'focus on building forts', but the "where" condition in most cases would prevent the castle from being built [unless of course one of those remaining provinces was some choke-point / high resource / not adajcent to another fort type condition]. So the AI wouldn't in most cases "waste" money building forts late-game when it had a small territory size.

Of course there'll be some holes in the idea and/or limitations since its quite a rough draft, but maybe it'll give someone a more 'developed' idea.
Reply With Quote