Glad you like the game! Indeed, the ships need some pathfinding added to them. Currently, they go to the center of the map and attack everything in their path. Knowing this, you can easily setup your base and build an army without getting attacked.