Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2006:
[Freeciv-Dev] Re: (PR#15249) Aggressive AI Could Fight Itself to Obsolen

[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]
To: badamson@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#15249) Aggressive AI Could Fight Itself to Obsolence
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Jan 2006 10:17:04 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: >

Benedict Adamson wrote:
> <URL: >
> The AI tax-rate code, function ai_manage_taxes() in aihand.c, has the 
> following code fragment:
>    /* Ok, we now have the desired tax and luxury rates. Do we really want
>     * science? If not, swap it with tax if it is bigger. */
>    if ((ai_wants_no_science(pplayer) || ai_on_war_footing(pplayer))
>        && pplayer-> > pplayer-> {
>      int science = pplayer->;
>      /* Swap science and tax */
>      pplayer-> = pplayer->;
>      pplayer-> = science;
>    }
> Now, consider an aggressive (that is, on a war-footing) AI Democracy 
> which, because of careful previous budgeting or city improvements, does 
> not NEED any taxes or luxuries. The tax rate would be computed as 0% and 
> science as 100%, but then the code fragment above would swap them 
> around. The next turn, the AI would have even more cash in hand, and 
> thus even less reason to have a positive tax rate... but the fragment 
> would still set the tax rate to 100% and science to 0%. If the AI is 
> (almost) always on a war footing, it will fall behind in the technology 
> race.

"Swapping" is incredibly dumb here.  Better would be to hand over a 
fixed percantage, like 20%.


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