Smart dynamic trajectory planning of autonomous underwater vehicles using reinforcement learning and historical data