it's raycasting where each ship has a cone of vision. If they spot the player they will chase you, if they spot another ship they will steer away. It's a very simple solution:)