View Single Post
  #28  
Old October 29th, 2003, 10:49 AM

Pocus Pocus is offline
Lieutenant Colonel
 
Join Date: Apr 2003
Location: Nuts-Land, counting them.
Posts: 1,329
Thanks: 1
Thanked 0 Times in 0 Posts
Pocus is on a distinguished road
Default Re: Dominions 2. AI. Suggestions, that how to fix it.

a poster got a very valid point about the AI : the AI dont go enough for quality. This is why we see so many indeps units in the AI armies.

I think the AI algorithm should be refined on what to buy. An ideal proportion of weak troops should be fixed, and recruitment in these weak troops should be stopped when the % is reached.

You can then refine the system by changing the proportion depending on what type of AI level, the type of map, or nation the AI play, but as of now, here is a raw first implementation :

troop quality (TQ) : gold + resource cost

National average of TQ : for each unit (not leader!) type in the national roster, compute TQ. Average it. It gives the average TQ of the nation (Ulm would have a higher TQ than say Ctis IMO). Lets call it NATQ

ideal TQ proportion to be reached:
TQ inf 0.5 NATQ : 20%
0.5 NATQ inf TQ inf 0.9 NATQ : 20 %
0.9 NATQ inf TQ inf 1.3 NATQ : 40%
1.3 NATQ inf TQ : 20%

have to use inf for the inferior sign, as otherwise the post decipher it as an HTML flag

Troop recruitment:
order of province browsing: to be determined smartly. I can post an algo, but this is not my point here, and it have to include a bunch of params.

so ...

get a sorted list of province where the recruitment will take place.
sort each type of troop available, from highest TQ to lowest. if troop Category is in a TQ which is undermanned, recruit 1. Repeat until no more gold, resource, or TQ is ok. Proceed to the next troop type.
Then proceed to the next province.

improvment :
overrides (partial or complete) should be used if the province has a particularly high interest in the 'province which will undertake recruitment list'.

this is very crude. You can refine by splitting desired proportion between main line units, missiles, cavalry, etc.
__________________
Currently playing: Dominions III, Civilization IV, Ageod American Civil War.
Reply With Quote