A new visualization created by a group of masters students at Harvard’s Kennedy School of Government explains how an algorithm works in the easiest possible terms that everyone can relate to: deciding what fruit to buy at the market.

[Image: Aki Younge, Deepra Yusuf, Elyse Voegeli, and Jon Truong]

On a website called Automating NYC, the students endeavor to explain “automated decision systems,” which rely on algorithms to make decisions that impact people’s lives. To do so, they start with a visualization of a group of avocados, then ask the reader to decide which one to purchase. Because algorithms at their most simple are just a set of instructions, the students provide a short list of requirements for the hypothetical avocado you want to buy: It should be affordable, ideally organic, but less than $1.50, and it needs to be ripe (guacamole is on the menu for that night).

[Image: Aki Younge, Deepra Yusuf, Elyse Voegeli, and Jon Truong]

Then, you can hover your mouse over each illustrated avocado to see how much it costs, whether it’s organic or not, and how ripe it is. “All the calculations you’re doing in your head are an algorithm,” the students write.

And once you can observe the way your brain works when choosing one of these fictional avocados, it becomes easier to understand how an automated decision system might do the same exact thing: Given a set of rules, it would try to rank each avocado based on how well it fits into the rules.

[Image: Aki Younge, Deepra Yusuf, Elyse Voegeli, and Jon Truong]

In Automating NYC, creators Aki Younge, Deepra Yusuf, Elyse Voegeli, and Jon Truong also explain real-world situations where people’s lives are impacted when an algorithm makes a decision about them. For instance, they highlight a New York City bodega owner whose business is suffering because an algorithm thinks he’s committing food stamp fraud, when in reality he employs an informal IOU system to help people in his community. Because the algorithm wasn’t designed to recognize this kind of situation, it has stopped him from being able to accept any food stamps at all, and his sales have fallen 30%.

About the author

Katharine Schwab is an associate editor based in New York who covers technology, design, and culture. Email her at kschwab@fastcompany.com and sign up for her newsletter here: https://tinyletter.com/schwabability