The Civ4 AI does "cheat"

ported said:
It was just so obvious, move my workboat out, IMMEDIATELY the destroyers would enter my waters-- my borders were adjacent to the Incans, so my cities nearest them gave me the heads-up long in advance. However, my fishing city in question was clear across on the other side... it would take the Incan destroyers about 3-4 turns to hit the fish net (when I had them built).

Explain further, does it take the destroyers 3-4 turns to get to your coastal town? Or SHOULD it take them 3-4 turns to get to your town?

ported said:
As more evidence to me was the AI behavior of their destroyers in between my little workboat gauntlet runs. They would just sort of meander around right up against my borders when I had no boats in the water. Move the workboat out (NOT building the nets at this point), and they would make an immediate b-line toward it... and destroy it, if I left it out a second time. Once I moved it back inside the city, wherever the destroyers where, they would do their little "loop" maneuvering and eventually end up back in their waters, albeit at a much slower pace.

How is this cheating? If you EXPECT a workboat to come out of a city of course you'll meander around the border of an opposing nation. And the can see your workboat as soon as it moves out. This is in fact SUPPORTING the argument the AI is smarter and is blind, because the destroyers MUST be right at your border.
 
NO - do we have to draw a map?

He had a coastline with his workboat-city at one end, and the OTHER end of his coastline up against the Incans!

The Incans could NOT see the city with the workboat - they were at the other end of his coastline.
 
Did the incans have a religion in the city?

Wodan
 
Kazper said:
NO - do we have to draw a map?

He had a coastline with his workboat-city at one end, and the OTHER end of his coastline up against the Incans!

The Incans could NOT see the city with the workboat - they were at the other end of his coastline.

He's contradicting himself all over the place, though. First he claims the destroyers are 3-4 turns away, then he claims they sink his workboat if he leaves it out for two turns. Something's off, and without a save, I'm not convinced it's the game.
 
Disregard my previous post; I missed the linked thread from Apolyton. I'll have to check it out.
 
There was an interview recently with one of the Firaxis dev team - forget which site hosted it, sorry I don't have time to search right now - but one of the questions was specifically about AI cheating. The answer was something to the effect of "the AI cheats a lot less in Civ4".

I think the point made was that at lower levels the AI doesn't cheat at all anymore, but as the levels go up there is subtle 'cheating' added in to keep the AI challenging. The answer was a bit vague, as I recall, but it was clear that AI cheating is still part of the plan.
 
You could always go into the world builder to see if the AI really had units nearby...of course, that would be cheating. :mischief:
 
I saw something in one of my games that sounds similar that I too found questionable. It was early in the modern era, but I was well ahead in the tech race. The French were attacking my coastline with a lone destroyer. They pillaged one resource and were set to get my fish, but I moved a battleship onto the resource to head them off (didn't have enough movement to get to it and attack them). So with my battleship sitting on the fish the destroyer fled. Next turn I move the battleship, but I don't know where the destroyer has gone and I don't find them. On the following turn, the destroyer comes back exactly two squares away from the fish just like before. That time I got them, but it seemed like the AI knew the second my ship was off the resource. It would be nice if someone with a navy situation would test this. Let the AI come, scare them off and see if they come back the second you move off the resource. Personally, I think the AI might mildly cheat. The blatantness of Civ3 seems to be gone though which is something I can live with quite happily.
 
It is very easy to see that the AI cheats. I just played my first game on Prince in civ 4 (I got this game only this year), and noticed that one of my neighbors had neither walls nor bronze units while I was able to produce swordsmen. I decided to attack. On my first attack, my swordsman was defeated by an archer. I looked at the stats. The archer was supposed to have a 95% city defense bonus, a 25% fortify bonus, and a 25% hill bonus (despite the fact that the city was not on a hill, so that's cheat #1), and the city appeared to have an inherent 40% bonus. My swordsman had a 55% city attack bonus. So the odds should have been 3*(2.85) = 8.55 (even including the hill bonus which should not have existed; it would have been 7.95 without the hill bonus) against 6*1.55 = 9.3. I know there is some luck involved, but those are good odds. Not only did that swordsman die, but the exact same thing happened to my other 3 units in virtually the same circumstance.

I also noticed while I was scouting that the wild animals killed my warriors very often so that it was very difficult to scout. Nearly all my warriors and scouts died when they had an advantage, such as when they were on a hill or in a forest against animals with equal base stats. The AI however, ran their units all around the map, indicating that they did not suffer the debuff against the wild animals.

The last two games I played on Noble I won a domination victory around the year 1900 on a massive world & marathon game speed, so I thought it was getting a little easy. But now I am rather frustrated because it is clear that the AI has a combat advantage and I have not been able to find any explanation for these cheats. If I cannot find any description of the AI combat cheat mechanics, then I either will not play again or I will enable cheats to counteract any unexplained advantage that I see.
 
If I cannot find any description of the AI combat cheat mechanics, then I either will not play again or I will enable cheats to counteract any unexplained advantage that I see.
On the Swords, they lost because combat modifiers do not work like that. A City Raider II Sword negates 55% of the bonus the city defending Archer gets, it does not add to it's strength unless the archer doesn't have that much bonus to lose. A City Garrison II Archer fully fortified on a 40% :culture: defence hill city gets +50% total from being on a hill due to the hill and a unit ability, +40% from the city, a total of +95% extra from City Garrison promos and a similar unit ability, and +25% from being fully fortified, for a total of +210%. Deduct -55% from your City Raider promos and the Sword's innate City Attack, and you end up with a +155% 3:strength: Archer versus a flat 6:strength: Sword, or 3×2.55=7.65:strength: vs. 6:strength:. The Archer also gets a First Strike Chance, giving it a chance to deal damage to the sword before he gets to do anything. All things combined, your sword only had a ~19% chance to win.

As for getting eaten by barbarians, I can't confirm or deny whether the game cheats the odds in that regard. I've lost my share of Warriors to lions despite ending my turn on a forested hill and I'm sure many people can say the same, but whether the game actually cheats or not I can't say. I can confirm that the AI gets +70% versus animals on all difficulty levels, the same bonus the player would get if playing on Settler (the bonus against human barb units is only +40%), so they will fair a great deal better against barbarians regardless.
 
That is very informative Aca. I didn't know the game mechanic worked like that. I have a couple questions. How does the culture boost the city defenses? Also, the city was not on a hill, as I said in my first post.

I have another question since you seem to know so much about the game. The archer which had the 95% bonus did not exist the turn before I attacked, and this was so early in the game that I was probably the only player with metalworking. The previous archers on the tile had no upgrades at all. I assumed the city used slavery to rush the build for the archer, but how would it get two city defense upgrades with so few techs?
 
How does the culture boost the city defenses?
Each time the city increases a level in culture (pops borders) it gains +20% defense.
10 culture = 20%
100 culture = 40%
500 culture = 60%
5000 culture = 80%
50000 culture = 100%
Normal speed settings

Also, the city was not on a hill, as I said in my first post.
Archers and Warriors have an inherent City Defense modifier, perhaps it was that.

I assumed the city used slavery to rush the build for the archer, but how would it get two city defense upgrades with so few techs?
If the unit has enough experience when built it can take promotions immediately. A barracks is likely as the AIs love to build them early, that's +3 Xp for promotion #1.

The only way it could get enough XP for promo 2 (5XP), even if Charismatic (4XP), is if the AI had one of Vassalage/Theocracy civic/settled Great General, or the unit earned the experience elsewhere (barb combat, hut upgrade, or it survived you attacking it, which can all give XP) then walked into the city.

Note that Protective leaders give their Archery units 2 free promos (CG I and Drill I) and any promotion they take can be on top of these free ones, but it doesn't sound like the case you are describing.
 
How does the culture boost the city defenses? Also, the city was not on a hill, as I said in my first post.
Cultural defence indeed is based on levels, though Walls/Castles/Chichen Itza can increase it as well. The former two only work against pre-Gunpowder units, though. As for the hill I've never seen the game incorrectly assign a hill defence bonus, so I have to assume you either missed it (big cities can make it difficult to tell whether they're on a hill, at times) or there was another modifier in play. Attacking across a river, for instance, also gives the defender a +25% modifier.

Also, one big things about promotions and attackers first deducting their bonuses from defenders that I didn't mention (primarily because I literally just noticed): Promotions that do "+X% Strength" do work they way you expected them to. A Sword with Combat I and Combat II (total +20% Strength, +10% City Attack from unit ability) does not deduct 30% from a defending archer, he adds +20% to his own :strength: and deducts 10% from the bonuses the archer gets. I'd also like to correct a mistake I made earlier - if an attacking unit has a bonus to attack that exceeds the bonus that a defender gets, the attacker does not add this remaining bonus to his :strength:. For example, a City Raider III Sword (total +85% City Attack) attacking an unfortified Warrior on a flatland Fort (+25% defence from the Fort, +25% from the Warrior's unit ability to defend cities, which the Fort counts as for combat purposes, for a total of +50%) fully negates the +50% defence the Warrior gets, and nothing else. The remaining +35% City Attack is basically wasted.

The archer which had the 95% bonus did not exist the turn before I attacked, and this was so early in the game that I was probably the only player with metalworking. The previous archers on the tile had no upgrades at all. I assumed the city used slavery to rush the build for the archer, but how would it get two city defense upgrades with so few techs?
If, as you mentioned earlier, this sudden CG II Archer was fully fortified, than the only explanation I can think of is that you attacked an unpromoted archer, who won enough fights and got enough exp (how much xp you get from a fight depends on how likely you are to win said fight, so a lucky win can be worth a relative ton of xp) to go from no promotions to CG II, and in getting those promotions healed enough health that you didn't recognize him as the same archer. Units do heal when they take promotions, and a fair amount too.
 
The combat odds generator is accurate (as is AcaMetis’s explanation of how promotions work), although it doesn’t reflect random bonuses like first strikes. If you press Shift while pointing at your target, you can see the combat odds displayed, to get a better idea of whether you want to go through with the attack.

The AI definitely cheats, but not with the combat odds (it does get better odds against barbarians and animals, less war weariness, cheaper builds, free starting techs and units at higher levels, greater visibility over water, etc). Most if not all of these cheats are documented.

The sudden CGII Archer could have been whipped (Barracks + Protective), or it might have re-entered the city from the side away from your attackers? Doesn’t explain the fortify bonus, admittedly. A screenshot would be helpful, or a savegame.

When units promote, they heal 50% of their outstanding damage, per promotion. Another reason not to promote units until the last minute.

Defending units only get 1 xp per win, regardless of the odds. Attacking units that win get a varying amount of XP depending on the odds – 1xp with 98% or better odds, 2% from about 90-97.9% odds, etc.
 
Regarding the hill bonus: If you are looking at the unit you will see all the bonuses that it CAN get, not all the bonuses that apply in the battle at hand. So, if you check an archer in a city not on a hill, who has a hill bonus, you will see the hill bonus listed but that bonus will not be used in figuring the combat odds. From what you have said, I suspect that this is what you are seeing and that you have assumed the bonus applies when it does not.
 
Since this thread has decided to haunt us from the grave, I might as well contribute to this topic. The AI is in the DLL, meaning we have the source code and can 100% see and control what it does. It doesn't cheat as much as the AI in some other games, but it's not without cheating. For starters, difficulty level adds multipliers to various tasks. This means a unit requiring 10 production for a human might only require 6 production for the AI on a high difficulty level while it requires 16 on an easy difficulty level. It's a fairly simple, yet efficient way of making the same AI code give multiple difficulty levels. There are other ways the AI cheat and they are all either to compensate for lacking human insights or simply something so difficult to calculate that cheating is better than waiting ages for the AI.

For field of vision, the code is actually fairly simple. Each plot has a counter for how many units can see the plot right now. In fact it has a counter for each team (not player, for each team because teams share vision). It's fast because say there are 4 units watching a plot. One unit moves away. The counter goes to 3. That's not 0 and that's it for calculating if the fog of war should cover the plot. The problem with this viewing cache is that it goes into savegames. In most cases that's ok, but say an update to either vanilla or a mod changes some xml data. Say we save the plot with 4 units watching it. On load because some vision changed, only 3 units is watching it. All 3 units move away and the cache has 1 left. This is more than 0, meaning the team can still see what is going on and effectively we broke the fog of war on that plot for that player. I tried this once due to my own modding mistake (I don't think it was ever released).

Now with this in mind, imagine a vanilla update did something like this. The AI gained "extra" field of vision around OP's city and then the AI would be cheating by always being able to watch the workboats/fishing boat improvement. While it feels like the AI cheating, if this is the explanation, it's actually a savegame bug. It's fairly hard to trigger, but not completely impossible and there is no way the human player can tell if the AI gains extra vision like that, meaning it will go unnoticed. Part of quality modmaking is to figure out ways of inspecting the AI to detect issues like that, inspect what the AI decides to do in the cities etc. Bugs related to human players are easy to spot (often). Bugs affecting AI only are much harder to discover.

No comment on the spaceship cheat. I simply don't know the code and I don't feel like investigating an issue, which might have existed 13 years ago, might not and might have been fixed in the meantime.
 
NO - do we have to draw a map?

He had a coastline with his workboat-city at one end, and the OTHER end of his coastline up against the Incans!

The Incans could NOT see the city with the workboat - they were at the other end of his coastline.

The AI does cheat in this regard AFAIK. AI units always have vision double their moves. For most land units they can see 2 tiles away (which is always why barbs can seem to track your fogbusters with quite a bit of accuracy); however, this is mostly inconsequential because they can only move 1 tile anyways so you can easily see they're going for you and either move or laugh in their face and destroy them.

However, naval units can see double their moves as well. This creates problems where destroyers and battleships can literally see about 15 tiles instead of the usual 2 and snipe your transports/work boats/ocean resources from basically thousands of miles away. Not really a way to counter them besides building defense battleships, and station one or three to protect your precious fish and the rest to guard your navy carrying hopefully a hundred tanks to smash the cities producing these annoying insects. Still, if you know your stuff, shouldn't be too hard. And if you have combustion while the AI does not (again, not really that hard to do on emperor and below), you can laugh while annihilating their entire navy with ease using nothing but a few transports.

As for why you should play the game when AI cheats blatantly in this way and others - it's fun. Gives a good challenge. And the game would absolutely be mind-numbingly easy if you were to strip away all their difficulty handicaps on the upper levels.
 
Top Bottom