Part IV · Chapter 10

Tribes Without Labels

Letting moving magnets pull scattered, unlabelled dots into natural groups.

In every chapter so far, someone stood beside the machine with an answer key. "This dot is blue. That dot is gold. This message is junk. That one is safe." The machine learned by trying to match answers a human already knew.

Now take the answer key away.

Imagine looking up at a dark sky full of plain white stars. Nobody has painted them into teams. Nobody has drawn borders or told you what groups exist. Yet your eyes immediately notice something: the stars are not spread evenly. They gather into cozy neighborhoods separated by quiet empty space.

How can a machine discover those hidden tribes all by itself, without a single label?

The Two-Step Captain Dance

Picture a big dark field filled with plain white dots. Drop a few colored Team Captains onto the field—anywhere at all, even at completely random spots. Each captain acts like a gentle magnet. Now repeat just two simple moves:

  1. Claim the closest dots: Every dot looks around at the captains and joins whichever one is nearest. It lights up in that captain's color.
  2. Walk to the middle: Each captain looks at all the dots that just joined their team, and glides to the exact center of their crowd.

That is the entire recipe. After the captains move, some dots near the edges realize a different captain is now closer—so they switch teams. Then the captains shift again to stay centered. After just a few rounds, nobody wants to switch anymore, and the hidden tribes snap into crystal clarity.

Interactive 1 The Two-Step Captain Dance
Step through the dance, drag any captain, or click empty space to add stars
Captains:
Plain white stars waiting — press Step 1 to let captains claim their closest dots.
Team Snugness

Try pressing Scramble Captains a few times with 3 Captains, then click Auto-Dance. Most of the time, the captains find the exact same three tribes. Occasionally, if two captains start right next to each other inside one neighborhood, they split that neighborhood in half while one lone captain stretches across two others!

Why Starting Spots Matter

Captains only ever walk toward the middle of the dots they currently hold—they never leap across the field to explore. That means a bad starting drop can trap them in an awkward arrangement. In practice, people simply run the dance several times from different random starting drops and keep the arrangement where every team is most tightly gathered around its captain.

When Circles Aren't Enough

Notice the faint glowing territory lines that appear whenever captains claim their closest dots. Every captain rules a flat-edged slice of the map, like soap bubbles pressed together. That works wonderfully when the hidden tribes are round, puffy clouds.

But what if the natural groups in the world are not round clouds? What if they curl around each other like two interlocking crescent moons? Switch the shape below and watch what happens when the captains try their dance.

Interactive 2 When Circles Aren't Enough
Compare how straight-line closeness handles round clouds vs. curling crescents
With round clouds, straight-line closeness finds the natural tribes cleanly.

On the interlocking crescents, the captains slice right through the middle of both moons! Why? Because a captain only asks one question: "How close is this dot in a straight line?" The tip of one crescent is closer in a straight line to the other crescent's center than to its own far tip.

Every tool in this book has a natural shape it expects to see. Moving magnets are brilliant at finding round, cozy neighborhoods—and seeing where they struggle teaches you when to reach for a different shape of lens.

The Big Picture

Even with zero labels, hidden groups can reveal themselves through a simple back-and-forth rhythm: dots choose their nearest captain, and captains glide to the middle of their dots. Just remember that straight-line magnets always carve the map into round-ish territories—so they shine on clumpy clouds, not winding crescents.

What people call this in the wild
Optional: reveal the textbook names for the ideas you just explored.
Finding Groups Without Answers
Unsupervised Learning / Clustering
Discovering natural patterns or groupings in data when nobody has provided labels beforehand.
The Two-Step Captain Dance
k-Means Clustering
Alternating between assigning each point to its nearest center and moving each center to the average of its points.
Each Team Captain
Centroid
The geometric center (average position) of all the points currently belonging to one group.
Number of Captains
The value "k"
The chosen number of groups you ask the algorithm to look for before starting the dance.