[R&F] Simple way to improve AI

EditorRex

Master of Allusion
Joined
Oct 25, 2006
Messages
368
Location
NC
One of the consistent problems in all Civ games has been the predictability of the AI. I believe some simple programming in which the AI identifies conditions and reacts with some level of randomization would improve this situation.

The problem generally is that the AI does not react appropriately based on both failure to understand what is happening and failure to take effective steps. However, to the degree that the AI does react reasonably, a second an important problem is that this reaction is highly predictable.

These conditions lead to human exploits of both the game itself and the AI's poor execution. While the game itself may need some tweaking, I'm focused here on the AI.

Recognition:
The AI needs to have better recognition of common human player tactics. For instance, the AI needs to discern the difference between the following:
  1. The human player has surrounded this city with ranged and/or seige units.
  2. The human player has surrounded this city with melee/spear units and has little or no ranged support
  3. The human player has surrounded this city with cavalry units
  4. The human player has surrounded this city with a mixed-unit army that includes some ranged/seige units
  5. The human player has surrounded this city with a mixed-unit army that does not include ranged/seige units
  6. The human player has one or two units near this city only.
(There are a few more possibilities, but these offer some idea of the categories the AI should recognize as distinct.)
For each of those categories, the AI should have a range of reasonable/unreasonable responses that would be randomized with degrees of probability depending on the difficulty level.

For instance, in condition 1 above, combinations of the following responses might be possible and perhaps reasonable:
  • Complete or buy AI city walls
  • Complete or buy ranged AI units
  • Complete or buy AI melee or mounted units
  • Attack besieging units with nearby AI units, walls, encampment, etc.
  • Scuttle valuable buildings and retreat from city.
  • Do nothing until one of these others can be done on another turn
  • Attack the enemy somewhere else to divert units
  • Bribe another AI to DOW on the enemy.
  • Peel away the enemy's suzerains.
  • Suzerain a CS located near the enemy's cities.
  • Attack the enemy's trade routes.
  • Attack the enemy's units that are not near the AI's cities.
  • Prioritize against attacking an enemy's units if you cannot kill them this turn.
  • Prioritize against attacking an enemy's units if they can pillage where they stand.
Let's say that the civ is randomly set to select five of these items as its plan for that turn. At higher difficulty levels, certain items would be more heavily weighted, or would be attached to additional conditions the game might identify. But even at the highest levels, the probability of what the enemy would do might be no better than 50/50 unless there's a sure-kill situation. For instance, on Deity, with a non-capital low-value unwalled and ungarrisoned city besieged by archers early game, the AI might have a 50% chance of directing its military units from elsewhere to hassle those besiegers and a 50% chance of sending the AI military to attack the human-player's unwalled ungarrisoned cities. In this way, the human player will not have a clear idea of what will happen next and has to prepare for all possibilities.

Disclaimer: I don't claim to know exactly how the AI operates now. Perhaps some of you who read code have a very precise idea. But it doesn't seem to operate along the lines I have described here.
 
Just for the record. I've already implemented similar mechanics in my More Strategy mod. In case AI city siege by human player AI promptly draws combat unit from this city population for defense.
 
I guess this does nothing, since when I declare war on an AI, I'm always confident that my troop strength can take down cities even if my opponent is played by a human player. So refining on AI combat makes no sense. What it need to do is not to be lack of troops when being about to be declared war, or make full use of its troops to declare on human players when it actually have overwhelming numbers.
 
Just to clarify the purpose of the thread, it's a suggestion of what I'd like to see in upcoming patches or expansion backs, as well as the thinking on AI in the overall Civ series, which seems not to have gotten sufficient attention. Perhaps you could build a mod to do some of this. In theory, you could build a mod to do pretty much anything. But the suggestion is for the programmers themselves to do this so that umodded play improves. Programmers are getting paid (supposedly) to do this stuff, so why should the modding community have to fix broken games? I don't think Civ VI deserves the label "broken," but I've seen posters here and on FB that would go that far. I think this is an area of the game where substantial improvements would be valued.
 
Back
Top Bottom