[Freeciv-Dev] Re: (PR#15249) Aggressive AI Could Fight Itself to Obsolen
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15249 >
On Fri, 17 Mar 2006, Benedict Adamson wrote:
> Here is a patch. I have extracted this patch from my reworking of the
> wants code (PR#14923). This patch should cause the AI to be less stupid
> when it has extreme tax needs. It uses negative feedback to correct the
> tax rate.
Can you be more specific as to what the AI is doing wrong today, and what
the AI is doing right with the patch?
+ if (ai_wants_no_science(pplayer)) {
+ /* Instead of science research, we should purchase things. */
+ f += 20;
+ }
Does this mean that the AI will waste science when it has researched
everything?
+ if (n_cities / 8 < ai->stats.units.upgradeable) {
+ /* We should spend cash on upgrading units */
+ f += 10;
+ }
Instead of guessing this way, could we use the number in
pplayer->ai.maxbuycost generated by the upgrade units code? It tries to
set a desired amount of gold to be raised next turn for upgrades and
purchases.
+/*
+ * Over how many turns to try and smooth out changes in the gold reserves.
+ * WAG
Is there any point in smoothing out changes to the tax settings? I mean,
settings of 100/0/0 then 0/100/0 next turn is just as good as 50/50/0 then
50/50/0?
- Per
|
|