Red and blue individuals are scattered randomly on a grid, very integrated. Some spaces are empty (white). Each red and blue moves to a new random empty position if more than half of its neighbors are a different color. No individual wants segregation. Yet, massive segregation emerges. Typically, over 80% end up next to none or just one of a different color, in this model, whereas that number is only about 20% at the start. This is based on nobel prize winner Thomas Schelling's famous model of "segregation."
When Thomas Schelling proposed this model in 1971, he had no access to fast computers, but used pennies and dimes.The rules are simple but sufficient to account for a kind of clustering many (including Schelling) call "segregation." The important point is that no individual wants segregation but yet it emerges collectively.