Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Requirements for gen eff AI
Home

[Freeciv-Dev] Requirements for gen eff AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Requirements for gen eff AI
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 13 May 2004 14:26:34 +0000 (GMT)

I am in the process of writing a new AI for the gen eff patch, and which
replaces the current improvements evaluation code. I need feedback from
the list on the requirements specifications for this code.

In particular, there are two fundamental problems:

The first, as I have indicated before, the new code cannot be used by the
server to give human players new default production. Is this acceptable?
If so, what remedy should we choose for this problem?

The second, speed is a problem. The new code uses exact measurement of the
effect of several improvements by actually adding them and measuring their
effect on the city's outputs. We only do this for city improvements that
have measureable effect, and only every Nth turn (where N is currently
myrand(10)).

The advantage is that the result we get are exact, unlike the guesses the
previous code made, which were by necessity often wildly off the mark,
being quite simple algorithms. It makes the AI build the correct buildings
at the correct locations and for all possible ruleset variations. For
exampe, it calculates correctly when it is worthwhile to move its Palace
(lower corruption) and when a Courthouse is better than a Marketplace.

The disadvantage is that this is very, very slow. The current slowdown is
approximately 4x autogame completion time, and while I estimate I can
bring it down to 2x without altering the fundamental design, you see what
kind of slowdown we are talking about here.

(When I say autogame completion time, this was measured by taking a big
savegame and running it for several turns, not by running actual
autogames, which would not be possible since the results would differ big
time.)

So, the question is, how much slowdown is acceptable?

The alternatives, as I see it, are either to go back to using guessing
algorithms or to write code that simulates adding buildings and
calculating their effects precisely without actually doing it (similar
perhaps to what CMA does). I can do the former, but I will not do the
latter myself as that is way too much work.

  - Per



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