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

[freeciv-ai] 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@xxxxxxxxxxx
Subject: [freeciv-ai] patch: don't reevaluate ai govt so often
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 11 May 2003 23:06:35 +0000 (GMT)

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

Attachment: aigovtfixp2.diff
Description: Text document


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