Caught the AI Cheating

IIRC the turn correctly, I moved units next to Delhi while we were at peace, and there was only a warrior there. During the IBT, Ghandi gave me the "leave or declare" - I declared. When it was my turn again, there was an unfortified spearman in Delhi and 1 less citizen.

If the player whipped something, it wouldn't be ready until his next turn - he couldn't have it before the AI moved again. My guess is that in the turn order, "diplomacy" comes before commerce, food, and shields (similar to the way it is in multiplayer), and once the player declares the AI breaks into the build sequence and whips a spear (cheater!!! :mischief:).

The AI doesn't have to cheat for this one. It is just a direct consequence of the turn order, the flipside of the player getting first refusal on the Philosophy slingshot and on wonder builds, if you like.
The turn order is:
1) Human player gets to move his units and look in his towns and advisors. I call this the player's mainturn. It ends when you hit "end turn".
2*) Your worker turns get applied, e.g. any workers which were still toiling when you hit end turn, but had a status of "1 turn to complete" finish their work.
3) The first AI (righmost on the graphs) gets his or her mainturn.
4) And so on through all the AI players, moving from right to left across the graphs. It is during his mainturn that Gandhi gave you that boot order. After you dowed, he went into his town and used the whip. Perfectly reasonable behaviour, no cheating.
5) The interturn starts. The human player's empire is considered first, which is why you always beat the AI to techs and wonders to which you are both 1 turn to complete.
5.1) Empire-wide, cash is added to your treasury, and beakers are added to your research project. If you get a tech, you can break into the interturn to speak to your advisors. You can sell new techs to AI even if, as a result of your getting the tech, their research is now (before their new beakers are added) at more than 100%, and that is how this thread started, iirc? The interturn will resume when you leave the advisors.
5.2) Town by town, the game checks the happiness situation, applying a riot if necessary. If the town is not rioting, food is added to the food box. If the food box is full, a new citizen is created and placed by the governor. If the town is not rioting, shields are added to the shield box. If the shield box is full, the building or unit is created.
5.3) Culture is added to your towns (so any cultural buildings just completed in 5.2 get culture this turn) and if necessary borders are popped, which triggers the governor to reassign your citizens (so this reassignment has no immediate effect, as your citizens have done their work for this turn).
6) The first AI gets his or her interturn. Then the second AI, etc. It is during his interturn that Gandhi's new unit was created.
7) The date is incremented, and we go back to step 1.

So the upshot is that because you are player #1, between a consecutive pair of your mainturns, every AI gets a mainturn and later an interturn, allowing it to rush units in time to defend against your approaching units. AI #7 probably goes on the forums and makes the same complaint about AI #8 rushing units...
So now let's think of a strat which you can do that the AI can't (apart from the much-used interturn tech trading). Between a consecutive pair of each AI's mainturns, you get an interturn and later a mainturn. So suppose an AI moves attackers next to your undefended (and unreachable) town. Normally, there is nothing much you can do to defend it. But if you have 1 turn to go on a tech, you can get into that town during the interturn, rush an attacker, and then during your mainturn you can take a crack at the AI unit.


* Okay, I'm not quite sure whether worker turns are added at the end of your mainturn, or at some point during your interturn. Probably the latter actually.
 
Indeed, :thanx: PaperBeetle - very interesting. That also explains why the rushed unit is never fortified when I expected it would be :goodjob:.

I just assumed that the turn sequence would be the same for multiplayer as for singleplayer, but I guess it isn't. In MP, the human's interturn comes directly before that human's mainturn. I've never played multiplayer with AI, but the multiplayer sequence could be something like:

1. Human 1 interturn
2. Human 1 mainturn
3. Human 2 interturn
4. Human 2 mainturn
5. AI 1 mainturn
6. AI 2 mainturn
7. AI 1 interturn
8. AI 2 interturn

or

1. Human 1 interturn
2. Human 1 mainturn
3. Human 2 interturn
4. Human 2 mainturn
5. AI 1 interturn
6. AI 1 mainturn
7. AI 2 interturn
8. AI 2 mainturn

Either way, if you investigate an AI city in MP, and it has 1 turn to go on a wonder, the AI will win :hmm:.
 
The turn order is:
1) Human player gets to move his units and look in his towns and advisors. I call this the player's mainturn. It ends when you hit "end turn".
2*) Your worker turns get applied, e.g. any workers which were still toiling when you hit end turn, but had a status of "1 turn to complete" finish their work.
3) The first AI (righmost on the graphs) gets his or her mainturn.

[...]

* Okay, I'm not quite sure whether worker turns are added at the end of your mainturn, or at some point during your interturn. Probably the latter actually.

The order as you outline above is actually correct. You can see this from improvements that you are building in the territory of an AI.

If (1) your workers there still have one turn to go and (2) during the AI's mainturn you are given the boot you will still find the improvement there completed on your next mainturn. Which means that the workerturns must have been added to the bucket before you were booted, i.e. before AI mainturn. That is the upside. :)

The (vicious) downside of this is that when you are hooking up luxuries/resources in AI land (with the intention of trading for them later) you might find that the AI traded away to another AI what you hooked up for yourself *.






* It is not that this ever happened to me. :mad: :mad: :cry:
 
The (vicious) downside of this is that when you are hooking up luxuries/resources in AI land (with the intention of trading for them later) you might find that the AI traded away to another AI what you hooked up for yourself *.
That's why in that position I send in a whole stack of workers that will road the tile in just one turn!
 
I know it cheats! How else can an enemy's (Germany) regular archer take down a whole army of my (Roman) Longbowsmen. It was like all of my arrows missed but every one of his scored a hit. I was just on the square a turn before he was and this guy came out of nowhere. It just makes me mad.
 
;)

I've maintained for a while now that the way the AI "challenges" the human depends on how well the human does. if you do well, ridiculuous results such like those you mention seem to happen more frequently. If you'd had elite swordsmen on hills and mountains you'd seen the AI attackning them with regular swordsmen and win, even across rivers, four times out of five and very often without a scratch. When you object to this and point out that a reg that attacks a fortified elite on a hill/mountain cannot win 5-0 on such a regular basis without there being something fishy, you will be informed by the cognosenti here that you suffer from Cognitive Bias and even that you're a troll.

Of course the AI cheats, it's programmed to do that to stop the runaway!
 
I won the first 7 straight combats in my first (and so far only) war in my current game last night. Got a leader shortly after too.

These were mostly vet swords vs regular spears. That's a pretty good streak. And I was absolutely miles ahead. ;)
 
I won the first 7 straight combats in my first (and so far only) war in my current game last night. Got a leader shortly after too.

These were mostly vet swords vs regular spears. That's a pretty good streak. And I was absolutely miles ahead. ;)

Didn't your version of the game come with an AI? :splat:
 
I won the first 7 straight combats in my first (and so far only) war in my current game last night. Got a leader shortly after too.

These were mostly vet swords vs regular spears. That's a pretty good streak. And I was absolutely miles ahead. ;)
Are you sure that you weren't cheating! :mischief: :D
 
I won the first 7 straight combats in my first (and so far only) war in my current game last night. Got a leader shortly after too.

These were mostly vet swords vs regular spears. That's a pretty good streak. And I was absolutely miles ahead. ;)

Got lucky yesterday too when I (Persia) had to deal with Greece. With regular Immortals against regular Holites fortified on a hill I only lost one battle and won three.
 
I always find that when i'm ahead I seem to do better. I always get tons of leaders and steamroller the AI getting good runs of combat wins against the odds etc when i'm finishing the game.
Are you sure that you weren't cheating! :mischief: :D
I was playing on Regent, does that count? :mischief:
 
Not exactly cheating, I'm just wondering if its how the game is wired. The AI is notoriously bad at war. Ally with a few of them against one of the others and they dont do anything. A few half-hearted rounds of attacks and they declare peace. But, if you are approaching victory, be it Domination or Cultural they suddenly start getting good at it. I've had a few games where I'm getting towards the limit and a few more cities wouldnt hurt my case. Out of nowhere one of the other Civs turns into the worlds best warmonger and takes a pile of enemy cities. It may be that I have substantially weakened the victim, but they are usually not short of troops to attack me with. Is it the way its wired?
 
Since people are talking about pRNG luck here, I'll talk about mine.

In an AWDG game I'm playing, I had !! Unbelievable !! good luck. My Spearman on hills with Walls (defense 4) struck down seven archers. My spearman only took 1HP of damage !! :) That games on my gf's PC, and I play it on weekends.

Another AWDG game I'm playing now, My speaman on hills struck down 5 attacking swordsmen !! It saved my city (and my defensive Great Leader) :)

Another AWDG game I abandoned, I won 3 mission-critical battles back to back, all when my odds were less than 50% for each battle :)

But it's not all good luck. Another AWDG game I played my archer army (attack of 3) went from 10 HP to 1 HP attacking a Jaguar Warrior (defense 1). I blame the fact that archer armies stink :)

About whether the AI cheats or not:
I'm a programmer, and if my programs grew a mind of their own, I'd be out of the job :( And I'd go back to Christianity. I've seen ! Thousands ! of cases where I'm like "What's going on here??" and after 7+ hours of code review I finally find ....<gasp>.... the program was just doing what i told it to do (it was a bug).

The AI doesn't "cheat", it has no concept of rules. It does what it's programmed to do. And AFAIK there is no code telling the AI to fudge battles. There COULD be a bug, but it is unlikely for many reasons (many tests have been done in WorldBuilder, many people reviewed game over a long time).

Maybe I will run a test in the World Builder (gotta whip out my statistics notes). If I find time, I'll try:
300 1HP archers attacking 300 1HP warriors. I'll measure the outcome. You'd guess that ~200 archers survive, but IIRC that's only around 35% chance of happening based on normal distribution. With my recent luck, maybe all 300 archers will survive
 
About whether the AI cheats or not:
...the program was just doing what i told it to do.

The AI doesn't "cheat", it has no concept of rules. It does what it's programmed to do.

I've been told that Soren Johnson, the programmer who wrote the Civ3 AI, has said that writing an AI that can beat the Player is fairly easy. It's writing an AI that can challenge the Player that's hard.

In the light of your comment, that is an interesting statement. To accomplish that, the AI must observe what the player does, assess the situation and react appropriately. It cannot follow its own "master plan" or it "beats the player", not "challenge the player".

Is it safe to assume that the AI won't play badly in order to "appropriately challenge" a really clueless player? I'd think so. There "must" be some sort of cut-off point below which the AI won't go. The interesting part is when the player does well, ie challenges the AI('s programming).

Now, how does the AI challenge a player who has out-expanded and out-reserached the AI? A player that has insured that the AI is kept happy by frequent and generous trading? A player that has not neglected its military? Hmm...
 
It usually goes to war, in some stupid fashion, when it has no chance of winning, or even damaging you. But it does annoy me.
 
A quote from Soren:
Soren Johnson said:
...for Civ at least, there is no such thing as - and never could be - a “fair” difficulty level where the AI is playing the same game as the human.

He gave a presentation recently (yesterday?) discussing game AI. He discusses the difference between a "Good AI", which is essentially a 'human substitute', and a "Fun AI", which is there to enhance the player's experience. In Civ, he tried to find a balance between them.
 
Is the presentation top secret or can you share it w/ the masses? Btw, are you w/ Fireaxis or someone equally civ associated?
 
The slides can be found here. Soren's own blog can be found here.

Soren left Firaxis last year, and is now working on Spore, for EA Maxis.

I have no official affiliation with Firaxis (or any game company) except through this site. I have conversed with Soren (and Barry, and Mike, and Jeff, and ...) on these forums for years, and I was privileged to visit Firaxis last November for an exclusive CivRev preview, as the representative of CFC.
 
Back
Top Bottom