what a waste — food and ai

Zach Brill
Bucknell AI & CogSci
3 min readNov 2, 2018
Source: PredictHQ

Humans are wasting an inconceivable amount of food. Globally, every year, nearly 1.6 billion tons of food is lost or wasted. In the U.S. alone, nearly one third of all food produced is wasted. We need to be doing something about this…

The problem is, what can we, computer scientists, even do? Our work just doesn’t overlap in any way with food or the food industry, right? To many, Apple is about as close as we’ll get to taking food into consideration during our design processes.

For our ‘Designing Minds’ midterm project, we decided to look further into the ways that computer scientists can influence global problems such as food waste. To properly balance this investigation, we must consider both sides of the coin…not only what sorts of products we might create that alleviate food waste, but the ways in which we could ultimately contribute to food being wasted.

This inquiry focused specifically on solutions that utilize Artificial Intelligence (AI). As a preface to our project, there are a few recent endeavors at the intersection of AI and food that are worth noting. In Japan, Hitachi has partnered with a hospital to try their hand at saving some food. They’ve implemented a computer vision system that analyzes photos of patient’s food trays, both before and after the food has been served. The AI then deciphers how much of the food was eaten, or not. If the patient is consistently leaving food unfinished, it will suggest that portion sizes be cut down, thus aiming to reduce the amount of food being tossed.

With enough initiatives taking on a similar mission, the world of tech could easily begin to have a substantial impact on food waste worldwide. This is exciting! As such, we decided to try our hand at the matter…

Our agent’s environment

We have developed a simple agent that creates grocery lists for users. This algorithm will be housed in a smart fridge, and, in the future, could perceive the contents of the fridge. As of now, this isn’t possible. However, we have relied on the ever trusty ‘hard coded’ fridge contents to develop and test the accuracy of our algorithm.

Our agent is fed, pardon the pun, a data set from the UK government that contains average consumption of various food products per family per week. We process this data, aggregating the whole list of products into averages per food category. This is necessary because the data set is almost too specific — who needs to know the difference between how much skimmed milk and partially skimmed milk is consumed on average?!

We use these averages to calculate how much of any given product a user should purchase, based on what we know is currently in their fridge. However this requires a little finagling. To suggest the user buy four eggs would be a mistake, as finding just four eggs to purchase would be a formidable task. To compensate, our helper agent will round up to some known quantity to be suggested. In this example, it will never suggest the purchase of less than six eggs. Our agent also takes into account past usage. It learns the user’s buying and consuming habits, catering itself to suggest less than the average amount if the user consistently uses less than that average.

Success…right? Well, while this entails the core functionality of our agent and ultimately provides it the knowledge it needs to aid the user, the rounding up behavior could contribute to food waste in vastly underestimated ways.

We should begin to overestimate our product impact. We believe this is the way forward in making sure we design ethically sound AI’s in the pivotal years of AI to come.

--

--