Hi, please resolve the issue of AI retreating as this becomes the all-encompassing strategy of the AI as you go up the years in the campaign.
After playing a lot of battles in the campaign and trying to look for a commonality as to when the AI flees, I believe the cause of this nothing to do with tonnage, armour, tech level, or number of ships the AI has in the match versus the player, but it is in fact is a setting in the AI logic where it calculates an ideal distance in order to be at a "safe" distance from the player's cannons.
The reason for coming to this conclusion is that the AI would flee even if it completely outnumbered me by several times, but only if my cannons were accurate enough to hit it at extreme ranges. One of my modern cruisers fought the AI in a 1945 campaign battle (setup was: 1v1, CA v CA), for whatever reason, my ships' MK V 10 inch cannons were inaccurate as hell, and so the enemy CA for once did not try to run away but decided to close the distance, once it was within IIRC 15ish KM of my ship, I started landing more and more shells, eventually beating it. This would explain why this AI behaviour only starts to become an issue later in the campaign... early campaign (1890-1900-ish) has your ships' accuracy so low that you cannot hit the broadside of a battleship-sized barn even at ranges of 1km or less, thus the AI has no need to "flee" and will readily engage your ship at close range, as the campaign goes on and your guns gain more and more accuracy and range, the AI ships begin to set and engagement distance farther and farther away. It may that the extreme ranges of higher tech ships are passing a value to the the AI that it was never intended to handle or all the accuracy buffs mean the final aimed value is at a distance that is enough for it to attempt to reach a distance from the player ships of several dozen kilometers -without seeing how it's coded I can only speculate.
In (very) pseudo code, it appears the ai is attempting to set it's distance in any given match via the following (warning, very pseud code and a lot of speculation):
ai_ship_engagement_range=player_ship_long_range_accurate_fire
So if the ai sees player_ship_long_range_accurate_fire as 50 km, it will try to create a distance of 50km from your ship/s
My suggested resolution:
Simply multiplying whatever this "safe distance" is called in the code by a value lower than 1.0 (maybe only applicable to ships built after a certain year like 1910), for example
(ai_ship_engagement_range=(player_ship_long_range_accurate_fire*0.7))
Or some kind of "else" statement to handle the extreme later game distances like:
(IF player_ship_long_range_accurate_fire=<25km THEN ai_ship_engagement_range=player_ship_long_range_accurate_fire
ELSE ai_ship_engagement_range=25km )
One other point to note:
Ships carrying torpedoes are seemingly not effected by this IF they are not part of a group with a non-torp-armed ship. Destroyers and I believe light cruisers will aggressively rush to your ships in order to get a launch angle on you at the AI's ideal torp range, even if it means their ships getting obliterated in the process. I bring this up because it is clearly possible to overwrite the AI "fleeing" behaviour.