• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Report Questionable Behavior

This one was very jarring for me. Turkey attacks Greece, but instead of going for Hazor directly from Poland's territory, it declares war by attacking the tile which is furthest to the east, thus wasting two turns.

attachment.php
 

Attachments

  • Turk attack.JPG
    Turk attack.JPG
    136.1 KB · Views: 386
I think I can guess what happened here.

The AI found the shortest path to your city, then went to war the moment it moved the army into your territory.

There are other possibilities -- did that terrain 'pop' recently from one side to the other?

---

What it could have done was picked a starting target (using whatever method), then checked for the closest square it could get to the target without going to war (by radius) making sure it could get there while at peace. Then it should have moved there and then attacked.

If someone gets the 'use the sign post layer for the AI' working, that should be reasonably doable (setting a waypoint of "rally point for war", and having the AI route through it on the final attack run...)
 
I'm playing a fun game right now. Hybrid MP/SP, in its way- standard/epic with two human players and the rest AIs. I don't expect that that would make any difference, but figured I should mention it up front.

There have been three things so far this game that have struck me as questionable decisions on the part of the AI. One weird decision, one huge error, and one utterly epic cockup.

Weird decision: sailing around the world I encounter Brennus, who at the time of meeting him is way ahead in the score and I am at .4 of his power. And here I had thought I was doing well. But hey, it's our first time on Monarch. So there's a naval stack of Brennus's.

20xGalley
4xCaravel
18xGalleon

That's it, no escort. Though not like "that's it" really covers it- so long as all the galleons are full of troops and no one else is, you'd have to attack 15 times to even have a chance of sinking a troop. But it's still a pretty... weird... stack.
I've seen what was dropped off from it- turns out it was holding 79 troops. I'll get to those troops when I get to the epic, epic, epic screwup.

Huge error:
Wang Kon was first to Sci Meth, with no one else even working on it yet. He then was willing to trade it around such that he was beaten to both Physics and Communism. I think this kind of behavior came up in the thread about improving AI tech management, but I wanted to mention it because it came up in this game. Poor Wang Kon.

Epic, epic, epic error:
Brennus dropped off his army of 79 troops in American territory (that being the other human player).
THEN he declared war.
His 79 troops are now in my territory... on another continent altogether. Couldn't he have checked to see that there was at least one tile on America's continent that America didn't control? The war went from utterly devastating (America would have had absolutely no chance whatsoever) to a joke, as American Frigates are eating transports for lunch. I have no idea where Brennus's huge transport stack went, but I can guarantee that it's going to have trouble getting back to its troops.
There are even places where he could have put his transports such that they were in uncultured water but were diagonal to American land.

I've got a couple of screenshots but they're on the other computer (we're playing as I type). I'll post them when we finish for the evening.
 
So Brennus had open borders with America and moved in his huge army under the open borders agreement. Then, after landing, he declared war and his troops were bounced, right?

Precisely so. Wouldn't have been so terrible except that they were bounced to another continent and America is having Brennus's fleet for lunch (Brennus doesn't have Chemistry, which explains the lack of escorts- he can't make Frigs yet).

Now, I think there's no way he could have developed that fleet with those troops in the first place without the naval improvements to Better AI. It's just too bad he couldn't utilize it properly. Yet. :mwaha:
 
Precisely so. Wouldn't have been so terrible except that they were bounced to another continent and America is having Brennus's fleet for lunch (Brennus doesn't have Chemistry, which explains the lack of escorts- he can't make Frigs yet).

Now, I think there's no way he could have developed that fleet with those troops in the first place without the naval improvements to Better AI. It's just too bad he couldn't utilize it properly. Yet. :mwaha:

I tied setting up the scenario, but couldn't recreate the behavior. Looking through the code, this situation seems to be handled pretty well ... whenever a loaded assault transport group moves into the territory of the player it is ready to sneak attack, it should declare war regardless of open borders status. Because of the way amphibious landings work, that applies whether the transports are moving into territorial waters or dropping onto land.

There are only a couple potential logical holes I can see:

- Caravel military transports. Doesn't apply in this case anyway as I think only the Portuguese have Caravel transports, but since caravels can move into territorial waters they wouldn't trigger a DoW until landing. It looks like this is still handled properly also, but I'm not 100% sure.

- Recent diplomatic activity. The transport checks whether the AI is "sneak attack ready" before heading out, but that's just a war plan check. It doesn't check whether the AI can actually declare war, while the code which does the declaration does check that it can declare.

This second case seems to likely be the source of the bug you experienced ... do you remember whether Brennus and America had some recent diplomatic agreement which might block war declarations?

Peace treaties obviously do this, other things might as well but I can't remember (no war for first x turns after open borders or something?).
 
- Recent diplomatic activity. The transport checks whether the AI is "sneak attack ready" before heading out, but that's just a war plan check. It doesn't check whether the AI can actually declare war, while the code which does the declaration does check that it can declare.

This second case seems to likely be the source of the bug you experienced ... do you remember whether Brennus and America had some recent diplomatic agreement which might block war declarations?

I just asked him, and I think you nailed it- as the huge transport stack approached, Brennus had made a demand of America. America, terrified of the armada, complied. This caused a 10 turn peace treaty, during which the troops landed. It expired, Brennus declared, but the troops had already landed, so they got bounced.

I do have a couple of screenshots but it doesn't sound like they will be useful, so I'll only post them upon request. I'm glad I took them, though- that's the biggest attack stack I have ever seen the AI field, ever, and this is my first game on a non-Large map in ages!
 
I just asked him, and I think you nailed it- as the huge transport stack approached, Brennus had made a demand of America. America, terrified of the armada, complied. This caused a 10 turn peace treaty, during which the troops landed. It expired, Brennus declared, but the troops had already landed, so they got bounced.

I do have a couple of screenshots but it doesn't sound like they will be useful, so I'll only post them upon request. I'm glad I took them, though- that's the biggest attack stack I have ever seen the AI field, ever, and this is my first game on a non-Large map in ages!

The rule that compliance with a demand results in a 10 turn peace treaty is new since BTS, right? I think the people at Firaxis didn't think this one through well. You sometimes see the AI make such demands from someone who they are planning to declare war on. If this civilisation then complies, it results in a peace treaty that thus sabotages the plans of the would-be conqueror.
So in the end the demand sabotages their own war plans.

I would suggest that an AI who is planning to declare war on a civilisation should be unwilling to make demands or requests and is unwilling to give into demands or requests.

Sometimes a 'clever' human player can even exploit this 10-turn peace treaty when it is fairly sure that it is going to be the target of a declaration of war. Such a clever player will make a small request or demand in order to postpone the declaration of war for 10 turns with a 10-turn peace treaty. I have done this once and it really felt like exploiting the game rules.
 
I agree- it seems like if know you plan to declare within 10 turns you shouldn't make demands. If the AI doesn't know well enough exactly how many more turns it needs to prepare, maybe just have it not make demands upon the target of a WHEOOHRN?

Granted, even if we remove this means by which it was triggered, the problem that caused the landing in the first place should probably be fixed in case there's another way for it to trigger that isn't found until later. :)
 
You know, sometimes I plan on attacking an AI and then make a demand of them, and if they comply, I'll switch my target since they aquiessed. I suppose this is roleplaying behavior by myself, but my point is I see no harm in the AI doing this too, it's supposed to play like a roleplayer. Though if the AI does this, it should switch it's target in my oppinion. For instance in the example above, what would have happened had Brennus switched his target to you instead of America? I don't think that would have hurt Brennus, and might have been an interesting behavior (would have given your friend a good laugh too).
 
Or sometimes one can finance a war against someone by demanding gold 11 turns before declaring. I don't know if we should add further benefit to agreeing to a demand, but rather it seems like this is all of a piece with the fact that an AI makes a decision to declare on someone and doesn't revisit that decision when he actually declares. If anything the AI should be willing to revisit its decision, in which case the new bonus to diplomacy from giving in might take effect.

What would have happened if Celtia had switched targets from America to me would have been me getting utterly destroyed- both because of the size of the army (which would have destroyed America had the AI not glitched) but also because Celtia was already in WHEOOHRN when I met him, so I made my plans based on the assumption that I wasn't the target and sent my forces to invade Monty. :)
 
I agree- it seems like if know you plan to declare within 10 turns you shouldn't make demands. If the AI doesn't know well enough exactly how many more turns it needs to prepare, maybe just have it not make demands upon the target of a WHEOOHRN?

Granted, even if we remove this means by which it was triggered, the problem that caused the landing in the first place should probably be fixed in case there's another way for it to trigger that isn't found until later. :)

Yes, I plan to address both ... the AI doesn't know exactly when it will declare war, but it does have a war planning period where it's reving up unit production but will not declare. In this 'preparing' war plan state it seems reasonable for the AI to still make demands and such, since it does revisit the decision to declare at least on some level when it decides to switch to a real war plan.

Once the AI has switched to running either a total or limited war plan, it's actually the movement of its units into enemy territory which cause the declaration of war, which is why it doesn't know when it will actually declare. For example, an AI can have decided to invade another continent based on caravel contact and then wait 50 turns running a total war plan while researching Astronomy. The only time the AI declares strictly through diplomacy is when it dogpiles in on an existing war.

Anyway, yes I'll both look into limiting the AI's making of demands of those it's about to invade as well as block transports and other attack stacks from getting into these sticky situations.
 
Anyway, yes I'll both look into limiting the AI's making of demands of those it's about to invade as well as block transports and other attack stacks from getting into these sticky situations.

Maybe the AI runs its civilisation like a democracy.

The war mongers are in power, they see a weak neighbour and gear up for war. At the end of their term, the people choose for the peace lovers and the peace lovers sign a 10-turn peace treaty. To appease the war-monger fraction, they demand a small sum of money in return for the peace treaty. The war mongers come into power again. Mad at the stupid 10 turn peace treaty that is enforced upon them by the previous government, they insist to still blindly move their troops into soon-to-be enemy territory and declare war at the first moment possible.

Only then do they realise that they live in a world where troop teleportation is possible...

So, it's all perfectly plausible and realistic, if you look at it from the right angle. :p
 
This is behavior that is suboptimal and easy to work around for a human, but I'm not sure how would be best to address it as an AI:'

Celtia's ginormous stack wandered into one of my cities and sat there. They went into the one closest to where they got bounced, and not the closest to home, but not necessarily a big deal. No attempt was made to rescue them during the war with America, which makes sense since (obviously) this is the closest city to American waters.

The war ended. Celtia spent a while regrouping and didn't try to pick up the troops. Then a lone galleon wandered into my city. It then left again. It had not picked up any troops. This happened 4 or 5 times until Brennus re-declared war, moved his galleon next to an American ironclad and watched it get eaten. I'm unclear on that bit of logic but that's not what I'm really concerned about, which was the lack of loading troops into his galleon when it was in the same city as his troops.

What I suspect happened:
Said city also had one of my privateers in it. I had built it because I was tired of America using a NavII+circumnav bonus Caravel to ferry spies in, so I figured if he tried it again I could at least make him send an escort. So there are privateers hiding in all three of my west coastal cities.

The galleon was willing to get within range and enter the city. However, my suspicion is that it then calculated that it would lose too much value if it got sunk full of troops, and oh look there's a privateer here, so let's not load troops, and so it went home, and then it got sent to pick up troops again, and rediscovered the privateer.

I was tempted to move the priv just to see if it got Celtia able to recover troops, but... I never did.

Any idea if my suspicion might be correct? Granted these units are way out of date now, but they still could have been useful to him if he'd been able to ferry even some of them back to his homeland during peacetime.
 
Good news: I have fixed the major bug which led to the whole troops getting stranded fiasco in the first place. I managed to recreate the scenario and have tested the fix, it works! Thanks for spotting that :goodjob:

There was a gaping hole in the AI logic here ... the AI was blocked from making demands while at war (duh) or preparing for war with a player, but not during the window when it was ready but the troops hadn't reached enemy territory yet. Then, if it made demands while preparing for war, it would have canceled its war plans ... but again, the case where it was ready but hadn't quite declared yet wasn't handled.

Bad news: Not sure whether the privateer is screwing up the pickup as you describe. You've got a good theory though with the privateer ... the stranded troop pickup logic does work pretty well, but I have never tested whether privateers foul it up. Most of my testing has been from empty islands, I'll see if I can figure anything out. In vanilla BTS though there'd be no chance of a pickup at all :p
 
In vanilla BTS though there'd be no chance of a pickup at all :p

Woot for the fix! And yeah, I do know just how much more ineptly the AI would be handling all of this without BetterAI- which is why I just can't go back to the old game anymore. ;)

I wish I could offer saved games with the galleon's behavior, but (a) it's a multiplayer game, so you'd need either two running Civs or for me to get a saved game where the other player has retired; (b) I don't tend to save, since I'm not the one hosting; and (c) I run with betterAI merged with BUG3.5.1 right now. So all in all I expect it's less than useful.

Some things that might have made the pickup more efficient/possible:
- The units stayed in the closest city to where they got stranded. They could have wandered 3 cities north and been substantially closer to his mainland. I'm not sure why they felt the need to be in a city- were they seeking out the defensive bonus for being in a friendly city?
- Also, moving to that spot 3 cities north would have taken then away from America and the privateers it was using to try to sink transport ships. Asking for them to take this into account seems like asking a lot, though. ;) Nine times out of ten I expect the stranded troops moving to the closest area to its mainland will probably move them away from a Worst Enemy's territory.
- Sending more ships and sending escort ships. I don't know how much the AI weights escorts when it's at peace, but in the era of privateers at least it should prefer to escort galleons with frigates or SoLs.
- Finally, if there is a way to tell that the logic isn't going to allow a pickup somewhere, maybe the troops could move? This, again, feels like it's likely to be asking a lot of the code. Is there an Waiting For Pickup AI that the stranded troops were assigned, or were they something else? If there is Waiting For Pickup, maybe when determining their actions a phantom Galleon (or whatever is the current transport) could be created there and the code could be tested to see if the phantom unit would make a pickup, and if not, move the troops? Upon reflection that sounds like it might be a great way to get stranded troops to run around in circles. Which could be funny but now I'm imagining the galleon chasing them around...

So I guess the only constructive thought I have there is, if there is a way that the troops "know" that they are stranded and awaiting pickup, they could move towards a coastal tile that is closer to their mainland to make pickup more efficient. And if this kind of rambling is more annoying than useful, I'll shup. :)
 
The troops do know when they are stranded and move to a city to await pickup ... but currently they go to the closest friendly city, as you saw. I'll tweak it so they pick a good city when possible ... the AI isn't good at picking good cities for basing naval ops now any way, that is on the list for future versions.
 
For the longest time I was unsure whether the way capitulations work is just poor or really bugged.

Now I experienced the worst case ever - time to report questionable behaviour:

Ragnar is at war with half of the world: Augustus Caesar + his vassal Monty, Frederick, Ghandi and myself. He had 2 Vassals himself - Wang Kon and Mao Zedong - who both got killed. The war is going bad for Ragnar, but he only lost 2 cities out of ~12 yet.

Then he capitulates, the turn he loses Hamburg to Frederick. Way too early. And not to Augustus Ceasar, who is the most powerful and has the biggest empire. Or to me, the one who killed his Vassals,is close 2nd in power and size, and is about to enter his territory with a huge army. He randomly capitulates to Frederick, who just managed to liberate 2 cities that formerly belonged to Germany anyway.

Just look at the screenshot:

139% land of Master (free at 50% :lol:)
49% population of Master (free at 50% :crazyeye:)

Basically, Augustus Caesar and myself were forced into peace while sending armies, and Ragnar capitulated in such a way that a single point of growth in any of his cities will be sufficient to break free from Fredderick - and at this point he will still have a large empire. He just escaped destruction in the lamest way I ever witnessed.

This just cannot be the way capitulations were intended to work.

civ4screenshot0007.jpg
 
maybe frederick killed more units?

He just escaped destruction

what's wrong with that? good AI = good FOR the AI, not good for the human player. ;)
 
Back
Top Bottom