This is a demonstration of Schelling's segregation model. Each square represents an agent. Each agent wants a some agents of it's same color neighboring it. If there are less than threshold similarly colored agents, the agent will be unhappy and will move randomly to an unoccupied location on the grid. If it is happy it will stay put.