The traveling salesman problem asks a deceptively simple question: What’s the shortest route that visits every point exactly once? It’s one of the hardest problems in computer science, and mathematicians have been working on it for nearly a century. It’s also what FM Logistic‘s warehouse operators face every day in Poland.
The facility spans eight football fields. It holds over 17,700 picking locations. And across every shift, up to several dozen operators on ride-on electric trucks crisscross the floor collecting cartons, each one navigating dozens of storage locations per tour. Every unnecessary step adds up: in time, in wear on the fleet, and in delayed fulfillment.
FM Logistic, a global logistics provider operating in over 14 countries, had already optimized their routing once. Their existing model used a fast, cost-prioritized allocation logic built for real-time responsiveness. It worked well, but it made decisions step by step, which limited how well it could coordinate routes across the full warehouse. With dozens of operators working the same floor across shifts, even a small routing improvement would compound quickly.
So they turned to AlphaEvolve on Google Cloud.
Teaching an AI to write better algorithms
AlphaEvolve is an evolutionary coding agent that generates and refines algorithms autonomously using Gemini models. Rather than calculating a schedule from fixed rules, it works as a coding partner: writing new code, scoring it, and iterating until it finds a better solution than the one it started with.
The team didn’t start from scratch. They gave AlphaEvolve a “seed” program: their existing algorithm, which made routing decisions one step at a time based on what looked best in the moment. This gave the agent a working baseline that already solved the problem, just not optimally. From there, AlphaEvolve used Gemini to generate variations of this code, introducing mutations and new logic to see if it could beat the human-designed original.
Measuring what good looks like
For AlphaEvolve to improve, it needs a way to measure how well each algorithm performs. FM Logistic designed a custom evaluation function using a representative dataset of 60 tours (over one hour of workforce data), letting the agent test thousands of generated algorithms against real-world conditions.
The evaluation scored every new piece of code on a primary goal: minimize the average travel distance per pick, while avoiding operational failures. The team built in specific penalties to steer the model away from unworkable solutions — things like exceeding forklift capacity, missing pending orders, assigning the same box twice, violating FIFO priority for older orders, or exceeding the computation time required for real-time operations.
The results
The new routing logic delivered immediate, measurable gains over the previous best baseline:
-
10.4% improvement in routing efficiency over the previous best solution.
-
15,000+ fewer kilometers of warehouse travel per year at full operational scale.
That efficiency gives FM Logistic room to handle larger order volumes with the same team and equipment, without adding headcount or expanding their fleet.
“Through our partnership with Google Cloud and the implementation of AlphaEvolve and Gemini, we further optimized our routing approach for fast-moving operations,” said Rodolphe Bey, Group CIO at FM Logistic. “The 10.4% improvement was achieved on top of an already highly optimized baseline, where further gains are typically hard to come by. This translates directly to faster fulfillment, improved working conditions for our teams, and reduced wear on our fleet.”
What the winning algorithm actually does
By running a series of experiments, each generating hundreds of candidate programs, AlphaEvolve developed a new algorithm that outperformed the previous best human-engineered one. The result is a set of clear, human-readable rules that warehouse teams can review and adjust as needs change.
The three core improvements:
-
Density-based starting points (Anchor selection): The previous system chose a starting mission based on the single location where the most missions overlapped. The new algorithm looks more broadly, identifying clusters of items that are close together and using those dense areas as “starting anchors” for building routes. Every tour begins with a highly efficient core.
-
Two-step filtering with distance simulation: To maintain real-time speed, the algorithm uses a two-stage process. First, a quick filter eliminates orders that do not fit the route’s logic. Second, a precise distance simulation runs only on the best remaining candidates to find the most efficient path, without slowing down warehouse operations.
-
Flexible route building: If the algorithm can’t fill a truck efficiently around a specific starting point, it doesn’t force a bad route. It returns those orders to the main pool so they can be picked up by a better-fitting route later, improving efficiency across the entire warehouse.
What’s next
The Poland pilot (which is now running in production) demonstrated what evolutionary AI can do for complex routing at warehouse scale. FM Logistic is now exploring extensions — applying the algorithm to other high-volume e-commerce facilities, researching how AlphaEvolve might help optimize road transport for less-than-truckload shipments, and investigating AI-driven product placement inside warehouses to further cut travel distances.
This project was a collaboration between the FM logistic team including: Mateusz Klimowicz, Jarosław Urbański, Florent Martin and Alberto Brogio and the AI for Science team at Google Cloud including (but not limited to): Kartik Sanu, Laurynas Tamulevičius, Nicolas Stroppa, Chris Page,Gary Ng, John Semerdjian, Skandar Hannachi, Vishal Agarwal and Anant Nawalgaria as well as our partners at Google DeepMind






