The shortest route between two ports is not always the cheapest. A ship that meets head seas burns more fuel to hold its speed, and one that rides a favorable current burns less. Weather routing chooses the course and the speed to suit the wind, waves and currents expected along the way, while still arriving on time. Fuel is also a regulatory matter: the International Maritime Organization revised its strategy in 2023 to aim for net-zero greenhouse gas emissions by about mid-century, and the European Union has included shipping in its Emissions Trading System since 2024, as Latinopoulos and colleagues (2025) and Mannarini and colleagues (2024) describe. Machine learning enters at three points: forecasting the sea, predicting fuel use and choosing the route.
Route, speed and an arrival window
A routing system controls two things, the course and the speed through the water. Currents then change the speed over the ground. The arrival window matters as much as the weather. In the test voyage of Latinopoulos and colleagues, a medium-sized container ship sails from Marseille to Piraeus with an ideal time of 74 hours, plus or minus 10. Without a window the cheapest speed on the shortest path is 9 knots, but to arrive in time it becomes 14 knots, which uses 126,382 liters of fuel and is the baseline for everything below. Arrival times also feed the planning described in the posts on
vessel ETA prediction and
berth scheduling.
The forecast gets older
Every routing method depends on a forecast, and forecasts lose accuracy with lead time. Marjanović and colleagues (2025) analyzed six months of NOAA forecasts for the North Atlantic. Significant wave height error grew from below 0.2 m at 24 hours to about 0.9 m at 168 hours, and wind speed error grew from 0.5 to 4.0 m/s. The authors note that uncertainty becomes pronounced beyond 72 hours, which matters for ocean crossings, where decisions are made early. Their data cover one region and one winter, so the numbers show the pattern and not a universal rate. Latinopoulos and colleagues therefore bring in a new forecast twice a day during the voyage.
Learning to forecast waves
Neural networks can forecast wave height directly from past observations. Shi and colleagues (2023) trained a transformer on hourly records from a US National Data Buoy Center buoy southwest of Hawaii, with 2000 to 2018 for training and 2022 for testing. Fed the previous 96 hours, it forecast the next 12 hours with a mean absolute error of 0.139 m and the next 96 hours with 0.329 m. It beat the MASNUM numerical wave model within 72 hours, cutting the error by 57% at 12 hours, but at 96 hours the gain was only 2.2%. During a typhoon in June 2022 all the learned models underestimated the rising waves, which the authors link to training data made up mostly of ordinary conditions. Hao and colleagues (2023) tested recurrent networks at three points in the South China Sea with reanalysis data, and found that a longer input history did not help: 24 hours worked best. This is one buoy and one test year, so it shows promise and not a general rule.
Predicting fuel use
A router needs to know what each speed costs in each condition. Latinopoulos and colleagues trained a gradient boosting model on sensor data from one ship of a shipping company, using speed, draft, wind speed and wind direction. It predicts fuel in liters per minute with a root mean square error of about 2. Wave effects are not modeled directly and enter only through the wind, which the authors list as a limit. In VISIR-2 a small neural network instead fits a ferry's performance curve, its speed and emissions in waves of a given height and direction. The authors report that it fitted the tabulated values well but gave unreliable values outside the range of the table.
A classical baseline
Not every router uses learning. VISIR-2, an open-source Python model by Mannarini and colleagues, searches a graph of possible legs with a variant of Dijkstra's algorithm and can minimize CO2 directly. For a 125 m ferry in the northwestern Mediterranean, about 6,000 routes computed with 2022 data saved on average between 0.6% and 2.2% of CO2 compared with the shortest-distance route, depending on engine load and sailing direction. The distribution is skewed: savings of at least 2% appeared for beam or head seas, and two-digit savings, up to 49%, were possible on about 10 days a year. The size of the gain therefore depends on the weather as much as on the algorithm, which the authors give as one reason why reported savings vary so much between studies.
Learning the route
Latinopoulos and colleagues let a reinforcement learning agent choose the bearing and speed at every hour. Two algorithms were tested. The Double Deep Q-Network (DDQN) picks from 285 fixed actions, and the Deep Deterministic Policy Gradient (DDPG) picks any bearing and any speed from 8 to 22 knots. Neither needs a predefined graph. Against the 126,382 liter baseline, DDQN saved 8.7% and DDPG saved 12.6%. Search methods on the same hexagonal grid saved between 2.8% (A* on fuel) and 13.8% (Tabu Search), which ended 1.3% ahead of DDPG. Learning also cost more: about three hours of training for DDPG against 150 seconds for Tabu Search. DDQN arrived after 85.8 hours, outside the window. The authors conclude that learning showed no clear routing advantage over heuristics on this voyage.
Adapting during the voyage
The case for learning is adaptation. A trained agent sent into a different day's weather can fail to reach the destination. Fine-tuning on the new forecast fixed this in 130 episodes for DDQN, about 8% of the original training, with a similar saving (7.9%). When updated forecasts replaced the original ones during the voyage, the saving of the original policy fell to 6.6% for DDQN and 10.7% for DDPG. After the weights were adjusted online, in 15 to 30 minutes, it recovered to 8.3% and 11.9%. The authors see the main value of learning in systems that update a route as conditions change.
Ship weather routing is therefore a chain: a forecast that ages, a fuel model that is only as good as its inputs, and a search that must meet an arrival window. Learned methods help most where conditions change, while classical searches stay hard to beat on a single plan. Reported savings, from 0.6 to 2.2% on average in one ferry study to 49% on the best days, depend on the weather as much as on the method.
References
-
Marine Voyage Optimization and Weather Routing with Deep Reinforcement Learning
Charilaos Latinopoulos, Efstathios Zavvos, Dimitrios Kaklis, Veerle Leemen, Aristides Halatsis
Journal of Marine Science and Engineering 13, 902 (2025)
-
A Machine-Learning Approach Based on Attention Mechanism for Significant Wave Height Forecasting
Jiao Shi, Tianyun Su, Xinfang Li, Fuwei Wang, Jingjing Cui, Zhendong Liu, Jie Wang
Journal of Marine Science and Engineering 11, 1821 (2023)
-
VISIR-2: ship weather routing in Python
Gianandrea Mannarini, Mario Leonardo Salinas, Lorenzo Carelli, Nicola Petacco, Josip Orović
Geoscientific Model Development 17, 4355-4382 (2024)
-
Anomalous Behavior in Weather Forecast Uncertainty: Implications for Ship Weather Routing
Marijana Marjanović, Jasna Prpić-Oršić, Anton Turk, Marko Valčić
Journal of Marine Science and Engineering 13, 1185 (2025)
-
Significant wave height prediction based on deep learning in the South China Sea
Peng Hao, Shuang Li, Yu Gao
Frontiers in Marine Science 9, 1113788 (2023)