AI Learns the Port of Call

A new AI framework can generate algorithms for complex planning problems, including port logistics challenges.
Published on 01 Oct 2026
Shipping containers stacked

The world’s busiest ports are constantly in flux and rely on thousands of interconnected decisions coordinated by complex optimisation algorithms. Adapting those algorithms as conditions change is both time and labour intensive. NTU researchers have developed an AI framework that automates much of that work, allowing users to develop algorithms for new optimisation problems that existing AI approaches fail to solve.

Every day, major ports around the world coordinate hundreds of vessel movements. Each arrival and departure requires numerous interconnected decisions, from assigning tugboats and berths to managing congestion and minimizing fuel use.

Behind these everyday operations are expert-designed algorithms that help determine the most efficient way to allocate limited resources. Unfortunately, these intricately coordinated operations are constantly under threat by small operational changes.

A tugboat out of service, berth closure, speed limit change, or new environmental constraint can have knock on effects that force engineers to redesign the underlying optimisation models and algorithms from scratch. The process can take months.

Aerial View of a Container shipAerial view of a cargo ship

NTU researchers Assistant Professor Yan Ran and Dr Gong Huatian from the School of Civil and Environmental Engineering (CEE) have spent the last year working through this problem. Their solution, Large Language Model (LLM)-driven Algorithm Construction via Complementary Evolution, or LACE, is an artificial intelligence (AI) framework that automates much of that process, reducing the time and specialist expertise needed to adapt complex planning systems. 

The framework uses large language models (LLMs) to help develop algorithms for complex optimisation problems. Rather than asking an LLM to produce a complete optimisation algorithm in one attempt, the researchers break the problem into smaller, structured components. The AI then generates and refines multiple specialised strategies for solving it.

Prof Yan Ran and Dr Gong HuatianAssistant Prof Yan Ran and Research Fellow Dr Gong Huatian

“Using LLMs automates much of the process. When conditions change, you can revise the inputs instead of rebuilding the model and developing a new solution from scratch,” explained Gong, co-author of the paper published in Nature Machine Intelligence on October 1, 2026.

“The AI era gives us the opportunity to democratise large-scale scheduling tasks,” added paper co-author Yan. “Historically, even mathematicians and programmers would find this problem hard to solve, but now a normal average person can do it using natural language.”

According to the professor, the work comes at an important moment. Maritime operations are becoming increasingly complex as ports handle growing amounts of data and must account for more interconnected operational and environmental considerations.

“As the number of variables grows, the number of possible combinations can become enormous. Conventional methods eventually won’t be able to solve this,” she asserted. 

A new approach to optimisation

Rather than exhaustively testing every possibility and combination, engineers typically design heuristics, algorithms that search for very good solutions within a practical amount of time. Developing effective heuristics for a new problem, however, can require considerable expertise and repeated experimentation.

Recent advances in LLMs mean AI can take on the work and generate computer code, but asking an LLM to produce an entire optimisation algorithm in a single attempt can be unreliable, particularly when it encounters a new problem for which it has no established solution to draw on.

LACE takes a different approach. It first establishes what information an algorithm will receive and what a valid solution should look like.

This gives the LLM a structured environment in which to work, allowing it to concentrate on developing strategies for solving the problem rather than having to generate every component itself.

LACE also does not rely on a single strategy. It generates multiple heuristics, then tests, modifies and combines them. It ultimately selects a portfolio of complementary approaches designed to perform well across different versions of the problem.

Instead of making individual operational decisions about where a tugboat should go or which berth a ship should use, the AI is helping to design the algorithms that can make those decisions.

Putting LACE to the test

The researchers first tested LACE on 36 established optimisation challenges that had existing datasets, including classic port problems, such as finding the shortest route between multiple locations. This allowed them to compare the results of their framework with existing approaches.

They then gave it a harder test: four new problems based on port operations, including assigning vessels to berths and working out how tugboats should be scheduled and routed when factors like operation bases and speeds vary.

LACE successfully generated feasible algorithms for all four.

Five existing LLM-based algorithm-generation approaches tested by the researchers, meanwhile, failed to produce a feasible algorithm for any of the four new problems.

The result suggests that the new framework is capable of more than adapting solutions that an AI model may already have encountered. By providing LLMs with a structured framework for algorithm development, the researchers showed that AI could generate effective strategies for previously unseen optimisation problems.

Solutions generally took around an hour to solve and costs less than US$10 in LLM and API costs.

Research Fellow Dr Gong Huatian (L) and Asst Prof Yan Ran highlight the LACE model they created.Assistant Prof Yan Ran and Research Fellow Gong Huatian review LACE

Beyond maritime

The researchers made LACE’s code and a demonstration publicly available on GitHub, allowing other researchers to test and adapt the framework.

Although maritime operations provided some of the most demanding test cases, the underlying challenge is not unique to ports.

Scheduling, routing and allocating limited resources are examples of combinatorial optimisation, problems that occur throughout modern infrastructure and industry.

“Any scheduling, routing, packing or assignment problem could benefit from this approach,” stated Yan.

Airports and train scheduling, resources like bed and operating theatre allocation in hospitals, power grid dispatch, airport management and manufacturing lines are among the many applications that could evolve.

Assembly lines for manufacturingManufacturing lines stretching across a facility

The longer-term aim is to allow domain experts to focus on describing the problem and providing the relevant information, while LACE handles much of the specialist work involved in developing algorithms to solve it.

To Yan the work also reflects the increasingly interdisciplinary nature of AI research. She specialises in maritime studies, while Gong’s expertise lies in combinatorial optimisation.

“The research is interdisciplinary. The algorithm can be viewed from the computer science perspective, the use cases from the maritime perspective, and in the future, we could explore it from the social sciences perspective,” she said.

With time, those differing perspectives will become increasingly necessary.

As shipping companies face increasingly complicated decisions around geopolitical disruptions, extreme weather and decarbonisation, optimisation systems will need to account for conditions that can change quickly. The transition towards alternative fuels such as methanol, hydrogen and ammonia could add further variables as operators decide how to deploy, retrofit or replace vessels.

“LACE offers a way for the algorithms behind those decisions to change along with the problems they are designed to solve,” concluded Gong. 

Story by Mabel Lee and Laura Dobberstein, NTU College of Engineering


Share this article: