AI has many problems and needs to be improved

Can't beat the AI? Is it too tame? Discuss the best strategies!
bard
Veteran
Posts: 110
Joined: Fri Jun 14, 2013 2:00 pm

Re: AI has many problems and needs to be improved

Postby bard » Sat Mar 12, 2016 6:15 am

In my opinion, the main problem of the AI is that they waste most of their resources trying to kill each other. I mean, the AI is not that bad when there is peace, but once they start a war, they stop developing their cities, and they only build military buildings and units. The problem is that they are so aggressive, that they are continually at war with each other. If a human player is able to survive the first turns, then it is easy to leave them behind while they keep fighting.

If you want a game easier at start, but more challenging at the end, I suggest to make one simple change to the AI of the ruleset that you are a using: increase the effect "Gain_AI_Love" for all AI players so they do not hate each other so much.

If using default ruleset, open the file /data/default/ai_effects.ruleset, and add these lines at the end:

Code: Select all

; Lower chance of AI wars
[effect_ai_normal_love]
type    = "Gain_AI_Love"
value   = 20
reqs    =
    { "type", "name", "range"
      "AI", "Normal", "Player"
    }

[effect_ai_hard_love]
type    = "Gain_AI_Love"
value   = 30
reqs    =
    { "type", "name", "range"
      "AI", "Hard", "Player"
    }

[effect_ai_cheat_love]
type    = "Gain_AI_Love"
value   = 40
reqs    =
    { "type", "name", "range"
      "AI", "Cheating", "Player"
    }



This code reduces the aggressiveness of the AI against other AI players, depending on the AI level (the harder the AI level, the less they are attacked).
If you increase the numeric value, the result is similar to place all the AIs in the same team, joined against the human players.
I have been able to play very challenging games this way.

fomalhaut
Posts: 36
Joined: Thu Feb 13, 2014 8:24 am
Location: Japan

Re: AI has many problems and needs to be improved

Postby fomalhaut » Sat Mar 19, 2016 7:21 am

Once the war begins, AI continues to lose "AI LOVE" for their enemy country.
It's a bigger problem because they don't try to quit the war at all.
They should make peace with their enemy regardless of "AI LOVE" before running out of their resources.

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: AI has many problems and needs to be improved

Postby Ozor Mox » Tue Mar 22, 2016 3:37 pm

bard wrote:In my opinion, the main problem of the AI is that they waste most of their resources trying to kill each other. I mean, the AI is not that bad when there is peace, but once they start a war, they stop developing their cities, and they only build military buildings and units. The problem is that they are so aggressive, that they are continually at war with each other. If a human player is able to survive the first turns, then it is easy to leave them behind while they keep fighting.


This is exactly my experience. If you run an AI only game with the standard ruleset, their research and infrastructure completely stall while they fight each other and most of the AIs don't even reach the end of the tech tree well past 2100.

The ruleset modification you have suggested is a little different to the one I now use which is:

Code: Select all

[effect_ai_love]
type = "Gain_AI_Love"
value = 30


This change means all players are affected equally including human. Using the numbers in your example, do you find all games eventually end up you vs all AIs, with no chance of ever getting a cease fire with any of them?

bard
Veteran
Posts: 110
Joined: Fri Jun 14, 2013 2:00 pm

Re: AI has many problems and needs to be improved

Postby bard » Fri Mar 25, 2016 3:29 pm

This change means all players are affected equally including human. Using the numbers in your example, do you find all games eventually end up you vs all AIs, with no chance of ever getting a cease fire with any of them?

Your are right, it happens as you describe. I personally like it because you are attacked by one or two AIs at start when you are weaker, and then more AIs join the war while you become stronger.

When I place all the AIs in the same team, the result is similar, but I do not like that they declare war on you all at same time.

I also tested the way you suggest, but I find that it is easy to avoid war completely in this case, ending all together in the same alliance. Although I agree your setting is probably the best one to maximize the development of AI nations.

Ozor Mox
Posts: 45
Joined: Wed Apr 02, 2014 12:15 pm

Re: AI has many problems and needs to be improved

Postby Ozor Mox » Thu Apr 07, 2016 10:11 am

The only thing I think I would find missing from playing your way is that you don't get any changing diplomatic landscape. I like the idea of wars breaking out, cease fires and peace treaties being signed, former friends becoming enemies and vice versa, etc. The way I suggested does allow for this to some extent, but it's quite a fine balancing act with the number to use for Gain_AI_Love. Set it too high and, like you said, you end up with global peace and quite a boring game.

Your way definitely sounds like a significant challenge though, especially if you can normally beat the AI with ease. I think those rules are also present in the civ2civ3 ruleset if I remember right.

lulz
Posts: 1
Joined: Thu Jul 07, 2016 9:58 pm

Re: AI has many problems and needs to be improved

Postby lulz » Thu Jul 07, 2016 10:13 pm

I think the largest problem that really cripples AI is that it almost always runs into 100% tax, thus not researching anything and stagnating. It seems that the largest reason for that is that it creates a shitton of units (half of which it never even uses) that require upkeep because they are well over the limit of free units per city. As a result, AI becomes short on money and dumps all its trade into taxes.

I'd suggest that AI factors unit upkeep into its value of units: units that will require gold each turn should be seen as not very desirable. Especially if tax rate is already high. If it already does so (which it doesn't look like, frankly), this upkeep penalty should be increased.

Shield upkeep (depending on government) is sort of different, but also results in awful builds where a city effectively produces 1 or even 0 shields per turn.

Another way for AI is to disband extra units for shields plus saved upkeep. Settlers can/should be joined to cities instead.

AI has many problems, but I believe this one is what makes most games pointless and boring. It's not interesting to fight with tanks against chariots.

User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: AI has many problems and needs to be improved

Postby GriffonSpade » Sat Jul 09, 2016 12:37 am

I think a contributing factor is that the defense bonuses are much too large. How can you reasonably expect to penetrate through a few phalanx rocking 15-20 defense each and regenerate all their hitpoints every other turn? You need half a dozen cities churning out catapults just to beat a size 1 city with two first tier technologies. So wars never really get resolved since neither actor can overcome the other's defense.

But yeah, the AI should definitely have a 'minimum surplus' feature. Always make sure to leave some gold, trade, and production freed up for active use, and not be completely bogged down by upkeep.
And ironically the ignore-tax ability of Hard AI is actually crippling them. I'm not even sure why that's on Hard AI instead of Cheating AI, anyway.