How iFood uses AI to predict when your food arrives

Did you order a pizza? Find out how artificial intelligence learns the time it takes to get ready and arrive at your home

Your meal arrived on time, hot, and have you always wanted to know how iFood manages to do this? It's not magic, it's technology! More precisely, Artificial intelligence.

The person who explains how AI can perform the “magic” of predicting the future of millions of orders per day is Christian Zambra, artificial intelligence product manager in the logistics area at iFood. 

He says that, just like our mind, the machine is capable of predicting what will happen. “We can predict the future through our learnings, by looking at the past and drawing future scenarios,” he writes in a article published on Medium.

Learning pizza arrival time

If you like pizza, imagine that in the last year you ordered delivery every week, on Tuesdays, Thursdays and Saturdays. Always at the same pizzeria. And you ordered so much that you acquired an incredible skill: predicting the moment your pizza arrives.

We will call this learning by another name: training.

What time does the pizza arrive?

With each observation about how long the pizza took to arrive at your house, this information transformed your neurons, strengthening connections (the synapses). So, you learn that, given this input information (Tuesday, 6pm, 4-cheese pizza), the delivery time was 30 minutes.

Keeping an eye on the pizza route

Now imagine that you are able to see the path of your pizza. Your order arrived, the pizzeria started making rounds and, depending on the day, it took more or less time to finish.

How long does it take for the pizza to be ready?

On each of these days, before your magical encounter with the pizza, another encounter took place: that of the delivery person and the restaurant. 

If someone observed these time variations for a long time — just as you learned that on Tuesdays the 4-cheese pizza takes 30 minutes to arrive —, they could predict that this same pizza will take 20 minutes to be ready. 

This way, you could notify the delivery person so that they arrived at the exact moment. Thanks to these perfect encounters and the predictions made by learning from observation, your pizza arrives hot.

How do machines learn?

Artificial intelligence is inspired by human intelligence. Machines learn through algorithms that seek to reproduce our learning process. 

One of these algorithms is called an artificial neural network. This network seeks to reproduce learning processes, such as those shown throughout the text.

How does the machine learn about pizza delivery?

Was this content useful to you?

Related posts