Purdue computer science researcher reroutes truckloads of excess food from landfills to food pantries
Algorithm balances distances with where the food can do the most good
Purdue University researcher Alex Psomas uses computer science tools to address real-world problems, including food shortages. His novel optimization algorithm helps truck drivers address food loss by routing excess food to food banks. (Purdue University photo/Kelsey Lefever)
WEST LAFAYETTE, Ind. — The planet already grows enough food to feed everyone. The problem is one of logistics. A third of all the food grown and raised goes to waste, meaning that one in 12 people does not have enough to eat.
Purdue University computer science expert Alex Psomas, who uses tools including machine learning and flexible algorithms to solve real-world economic problems, has invented a way to optimize the delivery of excess food to food banks. Psomas’ program, called Food Drop, assesses in real time what food banks are open, what space they have available and what food items they need, then balances those priorities against the trucks’ locations to find the closest place to take the food where it can do the most good.
“This is one of the ways that AI can help society,” Psomas said. “We can code and automate a system that optimizes distribution of food that’s otherwise just getting thrown away. That’s hundreds of tons of food just pulled from nowhere — food that’s now going to help real people.”
So far, Psomas, an assistant professor of computer science in Purdue’s College of Science, has worked with two nonprofits in two different Midwestern states, saving more than 50 tons of food from landfills and routing it to hungry mouths.
Food on the move: Research solutions focus on logistics
Psomas’ research focuses on the computation of contentment, which takes the emotion out of economic decisions. He asks the question: How can we use what we have to make the most people happy?
Food waste doesn’t only happen when the avocado in the pantry goes bad before it can be converted to guacamole and enjoyed. Hundreds of tons of food is thrown out before reaching grocery store shelves, a phenomenon more correctly called food loss. Causes range from shifts in ordering, late shipments and agricultural hiccups, but the ones salient to Psomas’ program are usually ones of scheduling, supply and service availability.
Food gets delivered late, and the grocery store no longer needs all the pumpkins on, for example, Nov. 1. If a shipment of canned soup requires a forklift to unload but is delivered late — after the qualified forklift operator has gone home — the grocery store might have to refuse shipment. Or if one pallet of lettuce in a truckload of 12 spills, cleaning up the mess may cost more than salvaging the remaining 11 perfectly fine pallets is worth.
In cases like those, the shipping company or the individual drivers are often responsible for figuring out what to do with an absurd amount of food. And often that food just ends up in a landfill.
But a nonprofit may have a forklift operator standing by, or volunteers who are willing to clean up the lettuce for the sake of the 11 free pallets. Their cost-benefit analysis is different from that of the farm or food distribution company that is trying to balance a bottom line.
“Of course no one wants to waste the food,” Psomas said. “It’s just built into the industry that sometimes a few shipments here and there are going to go astray, aren’t going to make it, are going to have to be thrown away. But if we can reroute that food to somewhere close by where it can do good, not make it a big ask, they’re going to do it. We want to make it easy to do the right thing.”
Taking the delivery to the food bank seems an obvious answer, but it is one with hidden pitfalls. For one, food banks often have set hours of delivery when they accept food — places run by volunteers can’t always be open. And not every food bank is going to be set up to accept, for example, 11 pallets of lettuce on 20 minutes’ notice. What is a truck driver to do?
“This is a more common problem than you might think among truck drivers,” Psomas said. “If you follow truck driver message boards or subreddits, you’ll find new drivers driving around with truckloads of frozen chicken that they need to get rid of asking what to do. Some people will suggest trying to find a food bank. But many of the comments will be saying, ‘Just drop it off at a landfill. Just get it over with.’”
Smart food: Human-led programming and optimization make Psomas’ program stand out
With such a simple idea — take the unwanted food to where it is wanted — why isn’t this a universal system?
“Food banks are overstretched and overworked,” Psomas said. “They’re usually at capacity, and they can’t possibly take on another thing, even if it’s something that will help in the long run. That’s where I come in. We can automate the system. We can make it almost effortless for the food bank. They set it up, using our system, and it just runs on its own.”
Psomas’ interest in food allocation programs began as postdoctoral researcher, where he worked on technical aspects of food distribution. He liked the intersection of technical work and human problem-solving, leading him to create the program.
“I really care about big applications, but at the same time, I’m a theoretician,” Psomas said. “For me, one of the coolest things about this project is that not only are the outcomes beneficial, but the math is actually pretty cool. The math we’re using is based on the power of two choices, a technique that was revolutionary in computer science.”
Psomas has set up such a system twice so far: Once in Indianapolis with the Indy Hunger Network and just recently in Ohio with the Last Mile Food Rescue in Cincinnati. His goal is to make his system available to anyone anywhere who might need it.
“The algorithms are already open source,” Psomas said. “My goal is to have somewhere to put them all, so that anyone who needs it can grab the program and use it, plug and play.”

About Purdue University
Purdue University is a research institution ranked among the top 10 public universities in the United States. More than 111,000 students study at Purdue across multiple campuses, including more than 57,000 at our main campus locations in West Lafayette and Indianapolis. As a land-grant university committed to affordability and accessibility, Purdue’s main campus has frozen tuition 14 years in a row, enabling more students than ever to graduate debt-free.
Media contact: Brittany Steff, bsteff@purdue.edu.
Note to journalists:
Photos are available on Google Drive.