Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Re: rfc: ai properly evaluate governments

[freeciv-ai] Re: rfc: ai properly evaluate governments

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: rfc: ai properly evaluate governments
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 5 Dec 2002 13:12:16 +0100

On Thu, Dec 05, 2002 at 11:51:21AM +0000, Per I. Mathisen wrote:
> > IMHO these values are a good
> > examples of the move-values-out-of-code idea from Gregory.
> Yes, but where?

Make a aiparameter.[ch]. The first version may look like:

int get_gov_flag_bonus_percent(...)
  switch(flag) {
    case G_...: return 20;

A second version than may read these values from a seperate config
file or nation ruleset. However I expect that there a lot of
parameters (20-50) with which you can control the AI. So while you
want a small interface (attack, expand, civilized or an enumartion) in
the nation ruleset you have to add another layer in between which maps
a set of 30 values to "a aggressive, expansionsm, uncivilized

> > Can you also compare your function with the existing one? What do you
> > do better? How does the results change?
> I was careful to maintain existing behaviour when it comes to
> racing-for-Republic. So early game is identical, except it doesn't show
> Republic as a goal most of the time (slight bug in set-goal code, I
> think), but that is cosmetic.

This sounds like you changed the values till you got the old behavior.

> After achieving Republic, however, it goes straight for Democracy. This is
> bad. It needs some kind of cooldown countdown to avoid wasting all tech
> efforts on governments. It is possible that this is because I only played
> with a single AI, however - the AI uses enemy units and cities to prime
> its tech tree so maybe it would work better in multiplayer.
> In any case, it goes for Democracy. This is good in that it calculates
> this will give it more trade, which is correct. This is bad in that the
> time should be better spent going after other techs.


 email: rf13@xxxxxxxxxxxxxxxxx
 checking for the vaidity of the Maxwell laws on this machine... ok
 checking if e=mc^2... ok
 checking if we can safely swap on /dev/fd0... yes
    -- kvirc 2.0.0's configure 

[Prev in Thread] Current Thread [Next in Thread]