Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2003:
[freeciv-ai] Re: patch: don't reevaluate ai govt so often

[freeciv-ai] Re: patch: don't reevaluate ai govt so often

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv AI development <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] Re: patch: don't reevaluate ai govt so often
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 12 May 2003 17:39:37 +0100 (BST)

Good patch!

Some comments though:

1. If we don't intend gov_reeval_turns to be variable, we should make it a 
constant.  Even if it is not a constant, we don't need to store it, just 
decrease govt_reeval to zero rather than increase it.

2. When the first evaluation is done, AI might have no cities and the 
results could be quite wrong.  So we probably shouldn't have constant 
reeval time.  How about using the number of our cities as the reeval time?

3. I watched AI play...  It seems to get into "too many units in the field 
=> can't do republic" vicious circle all too easy.  I don't know what to 
do about it.

4. How about making live_player_iterate macro? ;)


On Sun, 11 May 2003, Per I. Mathisen wrote:

> This patch makes us reevaluate governments only every 10 turns. We
> remember our calculations, so we will check if we can switch to better
> governments every turn. It is just the 'what is the best government'
> calculation which is done fewer times.
> It also contains the previous posted generic_city_refresh() and the update
> cities after evaluating governments fixes, the latter modified to fit. So
> now we also don't spam the client with our changes, and we reset cities
> properly after we are done.
> At some later date, we should also try to calculate using only a
> statistical sample of cities when the number of cities becomes large. This
> to avoid extreme CPU usage when the number of cities becomes very large
> (think 200+ cities under AI control).
>   - Per

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