More on the "shuffle of doom" bug that's probably affecting aggression (pics)

feralminded

Obsessive Number Cruncher
Joined
Nov 11, 2008
Messages
517
Location
Hudson, MA
So as I discussed in the sprawling "fix AI aggression thread" I've recently run into an extremely peculiar bug (or seems to be an obvious one to me). The situation is I started an Emperor game all but adjacent to Tenochtitlan (my only natural expansion was 7 tiles from that city) and so I built up and went about my merry way pretending that wasn't the case. Sure enough ~turn 135 I see a massive wave of turquoise enter my mapspace and I cringe expecting the end only to find out he built this massive army simply to shuffle around aimlessly in my territory (we have open borders) in a strange dance around the city I expected him to take. There's literally no way I can defend as he has 10+ units (I can only see maybe half of them at any one time) including catapults, composite bows, and of course jaguars. Here's the screenshots of turn 140ish. I continued playing until 160 just to see and he never attacked me, just continued to shuffle about and ultimately this would lose the game for him. At a minimum he should take this army and run over someone/anyone else ... not much could stop it ... but obviously the AI scripting hit some kind of deadly loop.

I say this because this is not the first time this has happened to me, though the other times we did not have open borders and instead they shuffled around my border with a similar scale army. Clearly this is some kind of scripting bug/error but it's really ruining the heck out of the game for me.

This is after about 6 turns of shuffling.
Civ5Screen0000_zpsbb48d241.png


And then I see the diplo screen and figure he's finally found the DoW button ... but nope.
Civ5Screen0002_zps6fdbb113.png


And then more and more of this
Civ5Screen0003_zpscce1109a.png


So how do we report this? Clearly this isn't intended nor desired behavior.
 
I've had the AI do this when I blocked off a choke point with a scout. Ai was trying to get into a perfect position then DoW but it couldn't due to the scout. Eventually they DoW.
 
So as I discussed in the sprawling "fix AI aggression thread" I've recently run into an extremely peculiar bug (or seems to be an obvious one to me). The situation is I started an Emperor game all but adjacent to Tenochtitlan (my only natural expansion was 7 tiles from that city) and so I built up and went about my merry way pretending that wasn't the case. Sure enough ~turn 135 I see a massive wave of turquoise enter my mapspace and I cringe expecting the end only to find out he built this massive army simply to shuffle around aimlessly in my territory (we have open borders) in a strange dance around the city I expected him to take. There's literally no way I can defend as he has 10+ units (I can only see maybe half of them at any one time) including catapults, composite bows, and of course jaguars. Here's the screenshots of turn 140ish. I continued playing until 160 just to see and he never attacked me, just continued to shuffle about and ultimately this would lose the game for him. At a minimum he should take this army and run over someone/anyone else ... not much could stop it ... but obviously the AI scripting hit some kind of deadly loop.

I say this because this is not the first time this has happened to me, though the other times we did not have open borders and instead they shuffled around my border with a similar scale army. Clearly this is some kind of scripting bug/error but it's really ruining the heck out of the game for me.

This is after about 6 turns of shuffling.
Civ5Screen0000_zpsbb48d241.png


And then I see the diplo screen and figure he's finally found the DoW button ... but nope.
Civ5Screen0002_zps6fdbb113.png


And then more and more of this
Civ5Screen0003_zpscce1109a.png


So how do we report this? Clearly this isn't intended nor desired behavior.

My guess is that they are trying to get there troops into position but cannot due an occupied hex or some such.

This may be more of an issue now as anecdotally there seems to be more troops used in attacks and therefor more pathfinding and shuffling to accomplish.

Just have a look and see if his troops are rearranging intelligently ie moving siege/range units to the back, melee to front etc or are troops just randomly swapping positions ?

I would let in play through for 10-20 turns (some of the AI scripting IIRC correctly have timers associated with them) and see if it resolves its self. The troops may give up and go home, eventually reach their desired formation and attack, or just attack anyway.

Just keep an eye on if the armies are rearranging for a purpose or not. As you are likely aware it can take a while to rearrange your army into formation if you have quite a few and didn't bother to move them in formation on the way to the target (which I am not sure if the AI does or not).
 
I watched the Iroquois do this little war dance in front of my capital Venice.

I moved a bunch of missionaries to convert their cities (they didn't have a religion of their own) and in the next congress vote, I voted for them to be the host.

They were so satisfied that they took their troops back home and stayd friendly towards me the rest of the game.
 
Well I played 20 more turns and nothing actually happened. While I do understand the point that perhaps the AI pathing logic got hung up on something the fact that they were in my borders made little sense since if they DoW'd they would instantly be ported outside anyhow. Also if they wanted to attack I am not sure why they proposed the trade either. As I said I believe there to be some kind of AI script pitfall when it comes to DoWs and while I can't say for certain if this is more pervasive than this it certainly feels like this may have something to do with the highly variable aggression issues people have been seeing (some games the AI is attacking and operating largely as normal and other games they seem completely unable to do anything).
 
I had my good buddy Carthage camp a navy off my coast. I thought it was the inevitable backstab, but no. I rushed some city walls and she moved on and sacked Rome's last city.
 
I had Zulu do a shuffle of doom into the unclaimed tiles between my cities...but then he DoWed a couple of turns later :(
 
I've seen this a few times from Shaka and Monty. I experimented with moving my military away, and they would DoW. I think the AI can't reach JUST the right odds. So, try moving your military back and out of your territory.
 
Two theories mentioned above sound right to me. Either: (1) the AI really wanted to get at the CS that you blocked access to, or (2) the math for the logic table that triggers DOW just kept not working out for some reason.

Personally, I would MUCH prefer a two-tier level of border access: the first and most common for civilian unit free passage, and the second, reserved for declared allies, for military units.
 
Two theories mentioned above sound right to me. Either: (1) the AI really wanted to get at the CS that you blocked access to

It very well could be that ... in fact this is what I thought too but after running it up to ~turn 165 with him still just dancing in my territory I began to suspect otherwise. Either way I will take the save tonight and move all my military away and see what happens just to be sure.

(2) the math for the logic table that triggers DOW just kept not working out for some reason.
This is truly my fear because the math was VERY obviously in his favor. If this isn't a favorable attack at emperor (~15 units, including siege, composite bows, jaguars, GG) against a 20 strength city with one bow inside, one warrior and one bow outside ... then NOTHING is favorable. Your average emperor level player could take that city with 3 CBs and 2 jaguars ... I'd expect emperor level AI to be able to do it with 3x that.


The only other thing I can think of is he wanted to go straight for my capital (southeast of the picture just a hex) but since I have a unit parked in the mountain pass he can't seem to figure out how to go through the wide open field just to the north. I dunno for certain.
 
I've seen this a few times from Shaka and Monty. I experimented with moving my military away, and they would DoW. I think the AI can't reach JUST the right odds. So, try moving your military back and out of your territory.

This works. Russia was doing the shuffle on my borders in my recent game. She was Hostile with me so DoW was the intended purpose, but she couldn't bring herself to do it. Thing was, I WANTED her to declare so I removed my defending units from the borders. It wasn't quite enough so I completely vacated the city and the next turn she declared. Then my 8 units pop out of the shadows! :crazyeye:
 
Some questions for the OP: did you have a decent military off screen to the south? From what I've heard, the AI has gotten better at measuring the overall situation, and not just blithely attacking to take a city that it might not be able to keep. Also, what was the relationship between Monty and Kamehameha? If you and Suleiman were the only safe options for Caravans, this may also explain the lack of DoW; it's even possible Monty was facing an imminent invasion himself, which would also represent an improvement in the AI, IMO.

I saw something similar this week, where Brazil was to the north, and sent an invasion force to go after the Vikings, who actually had a very weak military. They got most of the way there, then turned around-- but this made sense, because Brazil's other neighbor was France, and those two hadn't gotten along all game, each declaring war on the other before it was all over. As a builder type myself, I admit I like this change from the "shoot first, ask questions later" style in G&K.
 
Some questions for the OP: did you have a decent military off screen to the south? From what I've heard, the AI has gotten better at measuring the overall situation, and not just blithely attacking to take a city that it might not be able to keep. Also, what was the relationship between Monty and Kamehameha? If you and Suleiman were the only safe options for Caravans, this may also explain the lack of DoW; it's even possible Monty was facing an imminent invasion himself, which would also represent an improvement in the AI, IMO

My entire military is 2 CBs, 1 warrior, and a catapult here, I have a spearman (hut upgrade) and a Trireme on that island to the east. That city also has walls.

I have no problem with the AI making the decision not to go to war in general and to play towards a different victory condition (in fact I find this to be a much more fun AI to play against), but he didn't build that army for defense so clearly somewhere a check was made "do I build a massive army to attack something opportunistically" and he passed it at that time.

The big issue I have is that if he will not use it he is at that point playing a severely crippled game. At the higher difficulty levels if any player (you or the AI) invests a massive portion of your early game hammers into an army it would have to take an incredibly MAJOR reason for it to make any sense to later opt out of that war because at that point you're essentially stuck with the decision to "attack and maybe win" or "don't attack and certainly lose." That's what bothers me here, once you commit to the troops to backout is akin to economic suicide.

In regards to the second comment if indeed he was facing an invasion himself (which I didn't witness during my 20 extra turns of playing this one) he would have logically pulled his troops back instead of just circling my city like a hungry vulture.

I don't believe the AI was programmed like this intentionally, it just makes no sense. I believe it was either a bug or an oversight of some kind. Monty's got me stone cold here and there's no trade route big enough to make up for the profits he'd make from sacking my two cities (both of which are literally loaded with gold, I had 5 gold resources between the two cities in addition to the world wonder and some other calendar resources). Even if for some reason it WAS bad to attack me he can steamroll anything he wants (that CS, Suileman, whatever) with this. Hell he's Honor and probably far enough to have the happiness from garrison ... it's better to garrison that army and do nothing with it instead of marching them in circles around me.

Don't get me wrong, I'm a fan of smarter AI that can play for the long game and I've had a ton of pleasure in many of my BNW games so far but this to me smells like a bug and not intended design. If Montezuma can't pull the trigger on Emperor with these kinds of odds, he never will.
 
Shuffle of non-doom.

I think it's the combination of mountain, river and your one warrior. The AI seems to me to have a standard for beginning a "surprise" backstabbing attack. They want to get a certain number of melee units around your city in turn one of the attack, and a certain number of ranged units in position. And they count warriors that they don't mean to attack as a closed off hex. As others have suggested, try just moving that warrior.

I've seen them shuffle their units fruitlessly *during* an attack, and it's usually around a defending melee unit that they could easily take if they put their mind to it, but that interferes with their sizing up a city attack.

This might be instructive, though, for times when one doesn't want to get attacked. What kinds of configurations will lock the AI into a shuffle?
 
And here I thought the Devs said they addressed the shuffle of AI doom. I've seen this to a smaller extent, too. Also a lot of instances of AI units running away into water which gets them destroyed easily.

Disappointing.
 
Shuffle of non-doom.

I think it's the combination of mountain, river and your one warrior. The AI seems to me to have a standard for beginning a "surprise" backstabbing attack. They want to get a certain number of melee units around your city in turn one of the attack, and a certain number of ranged units in position. And they count warriors that they don't mean to attack as a closed off hex. As others have suggested, try just moving that warrior.

I've seen them shuffle their units fruitlessly *during* an attack, and it's usually around a defending melee unit that they could easily take if they put their mind to it, but that interferes with their sizing up a city attack.

This might be instructive, though, for times when one doesn't want to get attacked. What kinds of configurations will lock the AI into a shuffle?

Was it not the case that whenever declaring war with Open Borders in place, all units get kicked out of the territory...? Or am I crazy and confusing civ4 with civ5?

If my memory is correct, then the whole theory of "attack is intended purpose" becomes weaker... OP has a point that could be worrisome IF Monty really was aiming at him. But from here, without access to the savegame, it seems hard to really know the true purpose/target.

Anyways, was that not the case with OB? If they took that away, then OB is too open for abuse...
 
Back
Top Bottom