Any plans for improved naval AI?

I think it would be good to make the following change to the visibility rules: A player can see all tiles from which an attack on one of their units came last turn. That would help the AI dealing with ranged/artillery units they can't see, and it wouldn't be a cheat because a human who plays with animations on already has that information (during the attack the animations are shown and temporarily reveal the tile).

But that change wouldn't address the issue of the AI not understanding submarines. For that we need something else. One rough idea how to train the AI could be: For each unit, we store a list containing the IDs of all enemy units that attacked it last turn. At the beginning of the tactical AI evaluations, the game goes through those lists. If the enemy unit is now dead, we can assume that the AI saw it dying. If the unit is on a revealed plot nothing needs to be done. If the unit is on an unrevealed plot, the attacked unit gets a flag indicating that is was attacked by a unit that's no longer visible. The current position of the attacker is not revealed to the tactical AI. Now the difficult question is how to train the tactical AI to make use of that information. They should consider doing recon to find the attacker...
 
I find a big problem with naval AI is that they don't commit their fleets very well.

They'll sail over to me with a huge fleet (sometimes if I'm caught off guard and they'll have massive numerical superiority) and attack, but the following turn retreat half the ships back to their borders, allowing me to defeat the remaining ships as I now have numerical parity.
 
That would help the AI dealing with ranged/artillery units they can't see, and it wouldn't be a cheat because a human who plays with animations on already has that information (during the attack the animations are shown and temporarily reveal the tile).
That doesn't show the information whether the unit is still on the tile after its turn though.

On the topic of submarines, do we really need invisibility in the game?
 
do we really need invisibility in the game?
in mp its pretty good, plus franchise staple since like civ 1 -- VP gonna be the standalone civ implementation if we go with visible submarines

if dll can be tweaked to allow units to transition between invisible and visible, ai deficiencies could be mitigated while maintaining some kind of invisibility in-game ie sub is visible for x turns after combat. or if we had a promo that made otherwise invisible unit, visible, we could use plague system to 'tag' them. But afaik in current state (have tested years ago) once a unit is invisible, it can't be made visible again without glitches. think its an engine issue and not dll but idk. This would be highly desireable feature for modding too

possible workaround we could try is to have the subs convert between unit types... have a visible sub at < full hp, invisible sub at full hp. haven't tried it in years, but afaik there was a working 'convert unit on hp threshold' feature in tables at one point
 
Last edited:
dont add more invisible units except for submarines, it's horrible. recon series in super power is invisible, try them yourself.
 
Giving the submarine a temporary promotion after attack, which would make it visible for 1 turn, might be an elegant solution. Not perfect, but doable and no extra AI training would be needed.
 
AI doesn't know its own unit is invisible or not. They won't try to preserve invisibility.
 
Checking whether a unit can be seen by any other unit is probably computationally heavy.
 
Someone had mentioned that the only way to get the AI to see the ships that recently attacked is to cheat. I assume that they would just get visibility where the player would not. Suppose the AI does get this ability. Does it matter that they are cheating? Will they use proper tactics with this cheat and make it so the naval warfare is better or will they just abuse it to death and make it unfair in the other direction?
 
is there any way to change the default visibility rules... for example, i'd like to have a 1-ring of visibility by default around each city, and vision on any tile with an improvement in it. If its just an empty owned plot and i have no unit nearby in any era prior to industrial, i dont think i should be able to see it
 
Let alone the AI builds so few ships, you can just overpower it with numbers, without exploiting its tactical flaws.
Exactly. I have never thought in anyways as OP did about naval warfare. At least at emperor and below the AI simply doesn't have a lot of ships and almost never in a formation. But even if the have 4 ships, can hardly call that a formation.

This also makes any peaceful strategy easier as you simply don't really need a lot of naval units for defense and can fully focus on land-based defense and units.
 
Would increasing all positive 'FLAVOR_NAVAL' AND 'FLAVOR_NAVAL_RECON' flavor values *3-4 times in "CoreStrategyChanges.sql", lead AIs to building much more ships? If yes, then I feel like it could solve the main issue - AI focusing on land units on naval maps.
 
I played with such a modified CoreStrategyChanges.sql and no difference. Played a Deity Archipelago, and just like in normal 4.19.1 I effortlessly won domination. Venice building a fleet larger than of the combined force of 11 other civs... times 5.
 
make all barbarian boats capturable, resulting in a lesser variant of the build-version available to player, no maintenance, and capturable by other players -- with recent surge in barb spawn, then we will see some big navies, albeit made up of junk lol.

alternatively, make barb boats able to capture and be captured -- simpler to implement

most fun i've had in the vp naval game recently was trying to contain/counter the barb fleet depicted in this screenshot (this is maybe about 30% of the full fleet size):
Spoiler :
20241230171750_1-jpg.713858

 
make all barbarian boats capturable, resulting in a lesser variant of the build-version available to player, no maintenance, and capturable by other players -- with recent surge in barb spawn, then we will see some big navies, albeit made up of junk lol.

alternatively, make barb boats able to capture and be captured -- simpler to implement

most fun i've had in the vp naval game recently was trying to contain/counter the barb fleet depicted in this screenshot (this is maybe about 30% of the full fleet size):
Spoiler :
20241230171750_1-jpg.713858

Bring back the Privateer concept from Civ 3:

Privateers are small frigates that carry no nationality markings, allowing them to attack and be attacked without revealing the nationality of the ship. Thus, you can attack another civilization's shipping without precipitating war.
 
make all barbarian boats capturable, resulting in a lesser variant of the build-version available to player, no maintenance, and capturable by other players -- with recent surge in barb spawn, then we will see some big navies, albeit made up of junk lol.

alternatively, make barb boats able to capture and be captured -- simpler to implement

most fun i've had in the vp naval game recently was trying to contain/counter the barb fleet depicted in this screenshot (this is maybe about 30% of the full fleet size):
Spoiler :
20241230171750_1-jpg.713858

I think that's a huge map thing. More unexplored areas on the map, more overall barb camps, and high difficulty makes them wander further away.
 
Back
Top Bottom