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...
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...