Follow-up Comment #2, bug #20062 (project freeciv):

Let me another guess... this time I'm almost sure it is a bug, now I think I
fully understand the related code.

In function "ai_manage_taxes",
the variable "rate_sci_balance" keeps a non valid value = -1 if
" == 0" (default value in most rulesets).
When it comes the time to "Set the rates", the code assumes that such value
"rate_sci_balance = -1" means that AI will lose bulbs (due to tech upkeep)
even with taxes maxed to science.
When "rate_tax_balance = -1" it means that AI will lose money (due to upkeep
costs) even with taxes maxed to gold.
When both values are -1, it prioritizes to maximize the science over the

      } else {
        /* Go for science and risk the loss of improvements or units. */
        rates[AI_RATE_SCI] = MAX(maxrate, rate_sci_min);
        rates[AI_RATE_TAX] = MIN(maxrate, RATE_REMAINS(rates));

As I see it, in every ruleset where tech upkeep is dissabled, if AI is losing
money, and if switching taxes to maximize gold does not get a positive income,
then the AI maximizes the science (instead of gold), making the situation even
worse for next turn...

I'm still trying to catch a clear savegame, but it is not so easy.

Forget the 1st AItaxRates.diff (I wish I could remove it), I have uploaded
this new fix to a new file: FixTaxRates2.diff

(file #16389)

Additional Item Attachment:

File name: FixAITaxRates2.diff            Size:1 KB


Reply to this item at:


  Mensaje enviado vía/por Gna!

Freeciv-dev mailing list

Reply via email to