Follow-up Comment #1, bug #21640 (project freeciv):

I found the cause, and it is not a bug, but a bad design, imho.

It is related to this code inside aihand.c


  /* Put the remaining to tax or science. */
  if (!adv_wants_science(pplayer) || dai_on_war_footing(ait, pplayer)) {
    rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX]
                                      + RATE_REMAINS(rates));
    rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX]
                                      + RATE_REMAINS(rates));
    rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI]
                                      + RATE_REMAINS(rates));
      log_base(LOGLEVEL_TAX, "%s [res] crazy "
                             "(Sci/Lux/Tax)>=%d/%d/%d",
               player_name(pplayer), rates[AI_RATE_SCI],
               rates[AI_RATE_LUX], rates[AI_RATE_TAX]);
      
  } else {
    rates[AI_RATE_SCI] = MIN(maxrate, rates[AI_RATE_SCI]
                                      + RATE_REMAINS(rates));
    rates[AI_RATE_TAX] = MIN(maxrate, rates[AI_RATE_TAX]
                                      + RATE_REMAINS(rates));
    rates[AI_RATE_LUX] = MIN(maxrate, rates[AI_RATE_LUX]
                                      + RATE_REMAINS(rates));
      log_base(LOGLEVEL_TAX, "%s [res] sane "
                             "(Sci/Lux/Tax)>=%d/%d/%d",
               player_name(pplayer), rates[AI_RATE_SCI],
               rates[AI_RATE_LUX], rates[AI_RATE_TAX]);


It seems the ai set the taxes to be able to pay the upkeeps (techs and
buildings), and the remaining taxes are send, in this order, to science, gold
and luxury... (this is good to me)

except if the ai is "on_war_footing", then the remaining taxes are send to
gold (ok), luxury, and science.

It seems the AI ends often in this "on_war_footing" state, and they prefer
luxury over science.

It was hard to notice in versions previous to 2.5 because HARD or CHEATING AI
levels overide the limits to taxes by governments, and the result was taxes
set 100% to gold; instead of 60% to gold, and 40% to luxury like now. 

I'll upload my suggested solution to prioritize the remaining taxes this way:
1) if (!adv_wants_science(pplayer) then gold, luxury, science
2) if dai_on_war_footing(ait, pplayer) then gold, science, luxury

I think it improves a lot the researching capability of the AI when taxes are
limited by H_RATES.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21640>

_______________________________________________
  Mensaje enviado vía/por Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to