I have coded a lot of the stuff mentioned above, though it is not yet complete: I must do the boarding on a ship part.
Please note that choice of an enemy target (land) is not that easy, particularly considering that you have to see the target in order to have an idea of the opposition there.
Choosing a port from which attack is possible is also a bit hard.
I am unsure the first implementation will pick good squares, and the placement of the ships to defend the coasts will need optimising.
I'm going to finish that first. Then interception orders will probably be needed, but they will be quite hard to get right as moves are simulaneous (note that historically, a fleet at large would be hard to catch before modern days unless you knew exactly where they were coming from and where they were going).