Processing Game

A grid of 50x50 cells

A grid of 50×50 cells

Thomas Schelling showed, in 1971, that a small preference for one’s neighbors to be of the same race could lead to total segregation. This model is used as an example to show how such individual behaviour can bring about such undesirable social conventions without the need for evil master plan [1].

The model can be played as a toy game on a Chessboard with Black and White counters. Instead, I used Cellular Automata (CA) model to simulate the game. CA are dynamic models in which space, time and state are discrete. CA models are conceptually simple and can be easily implemented on computers as a grid of cells.

I chose Schelling’s Solitaire game to illustrate the power of Processing, an open source programming language that simplifies creating images, animations, and interactions. In this case, Processing visualizes the interaction among cells, which represent neighbours, according to the rules of the game.

The rules state that for any cell if less than certain percentage (say 50%) of the adjacent cells are of a different color the cell moves to another randomly selected location on the grid. This process continues until neighbours who want to move have nowhere they want to go.

You can run the program by clicking on the picture above and watch how cells cluster together.

[1] Ken Binmore, “Game Theory: A Very Short Introduction”, Oxford University Press, pp.62-63.