In p, a bunch of particles interact with each other according to this simple rule: every particle moves towards, away, or watches other particles. When the program starts, each particle chooses a random color, position, and the particles with which it will interact. As the program runs, some particles join together to form a train and journey together thereafter. Some orbit each other. Some collapse into each other. Some form swarms that split and join. One cannot predict when or where or how many of these behaviors will emerge, but they usually do.