People learn best by doing. That's a simple idea, backed by reams of evidence. And yet I always struggle with this idea when I'm writing. Online science communication is by-and-large a passive medium, where the writer tells a story, and the reader listens. It might be an incredibly compelling and engaging story, but it's ultimately one where the writer is at the wheel and the reader is taken along for the ride. Sometimes this limitation frustrates me, because I recognize that it isn't the most effective way to communicate ideas.

But today I came across something that made me see a different way of communicating online, one that whole-heartedly adopts this 'learn by doing' philosophy and puts the reader in the driving seat. It's called Parable of the Polygons, and was built by Vi Hart and Nicky Case. It's what that they call a playable blog post, part story and part game, set in an imaginary world of squares and triangles. While it might at first seem like an odd mathematical game, it delivers a lucid and very relevant lesson on real-world segregation.

Vi Hart and Nicky Case / Public Domain

The goal of the game is to move the squares and triangles around until they're all happy. These shapes like living in a diverse world inhabited by squares and triangles alike - in fact they prefer diversity. But there's a small problem. Each shape is slightly 'shapist'. Here's how Hart and Case put it,

"These little cuties are 50% Triangles, 50% Squares, and 100% slightly shapist. But only slightly! In fact, every polygon prefers being in a diverse crowd: You can only move them if they're unhappy with their immediate neighborhood. Once they're OK where they are, you can't move them until they're unhappy with their neighbors again. They've got one, simple rule: “I wanna move if less than 1/3 of my neighbors are like me.” Harmless, right? Every polygon would be happy with a mixed neighborhood. Surely their small bias can't affect the larger shape of society that much? Well..."

By playing around with these squares and triangles, you'll discover how even slight biases towards similarly shaped neighbors can lead to total segregation. It's a tour of the counter-intuitive math of segregation, first spelt out by the Nobel Prize winning game theorist Thomas Schelling.

But it isn't all gloom, for the post also teaches us that if all shapes demand even the smallest bit of diversity in their neighborhoods (a slight anti-bias, if you will), then segregation plummets. The lesson here is that small individual preferences can create a large societal effect. It's up to us to determine which direction we want that effect to go - towards a diverse world or a completely segregated one.

The Parable of the Polygons is a truly interactive way of communicating an idea. And, perhaps just as important, it's incredibly well designed. The disarmingly charming cast of characters - delightfully animated circles and squares - playfully distill the essence of the idea, and allow Hart and Case to deliver an effective lesson about race and equality without getting embroiled in a heated political debate.

That's enough talk. Now go check out the Parable of the Polygons.

And once you're done with exploring that, if you live in the US, you might also be interested in this racial map of the US which shows you how diverse or segregated your neighborhood is.