I had a look into the arrangements for AI tax rate limits recently.
I think there may be several bugs here that want addressing for 2.5.0,
but I'm not sure what the intent is, hence this post before raising
I don't know why it's this complex; I haven't looked at Gna history for
rationale for why Hard gets its bonus one way and Cheating another.
Are we in the middle of a slow transition? With things the way they are,
I wouldn't be surprised if there are bugs that mean the lower AI levels
sometimes end up cheating.
(This is all based on code reading, not testing.)
There are several levels of behaviour here:
* At a low level, player_limit_to_max_rates() is hardcoded to let any
AI player set any tax rate. There are other places where
ai_controlled is checked wrt taxes (e.g. finish_revolution()).
(Should this be replaced with a check for H_RATES?)
* However, there's an AI-level-specific "handicap" called H_RATES which
looks like it prevents AI from requesting rates greater than the
ruleset-defined Max_Rates effect (which typically depends on
government). I think AI levels with this behaviour will not cheat in
(Mapping defined in handicap_of_skill_level(), can't be influenced by
ruleset or server configuration. Do we still need this given the
* A third level to consider is that the value of the Max_Rates effect
can depend on AI level in a ruleset-dependent way.
This was added in 2.5 to give ruleset authors control over cheating AI
However, we didn't do the same to Hard AI for some reason.
All our rulesets include an ai_effects.ruleset which gives Cheating
AI unlimited taxes, *except* civ2civ3, which doesn't include any
ai_effects.ruleset (maybe it should? It has some AI effects directly
in effects.ruleset). So in civ2civ3, "Hard" AI has more advantage
than "Cheating" AI, which can't cheat on taxes?
The net effect of all this:
H_RATES Max_Rates (classic) Net max rate
Away yes - ruleset
Novice yes - ruleset
Easy yes - ruleset
Normal yes - ruleset
Hard no - unlimited
Cheating (2.5+) yes +100% unlimited (except civ2civ3)
Experimental no - unlimited
(The original reason I looked into this was that I was concerned that
'/away' might allow a human player to benefit from the AI's use of
unlimited rates while the AI had control. But I don't think so; indeed
most of the cheating options seem to be disabled for the 'away' level
Freeciv-dev mailing list