Medium

Software
Javascript, HTML, CSS, and GLSL filesIn 1992, the mathematical biologists Martin A. Nowak and Robert M. May published a letter in the scientific journal Nature called “Evolutionary Games and Spatial Chaos.” In it, they provided a simplified model for the so-called “Prisoners’ Dilemma,” a thought experiment that was developed by the RAND Corporation during the Cold War and was used to demonstrate how individuals who choose to act in their own interest instead of cooperating with each other ultimately can make things worse for themselves. Their model assumes only two kinds of players: “those who always cooperate and those who always defect.” As they noted, their spatial model, in which “every individual ‘plays the game’ with their immediate neighbors,”
can generate chaotically changing spatial patterns, in which cooperators and defectors both persist indefinitely [. . .] If the starting configurations are sufficiently symmetrical, these ever-changing sequences of spatial patterns—dynamic fractals—can be extraordinarily beautiful and have interesting mathematical properties.
In her work of the same title, artist and programmer Sarah Friend creates a digital version of this “spatial model.” It takes the form of a dynamic grid made of colored dots that are animated in real time by code that runs in the viewer’s browser. Each dot is playing against its neighbors and can only do two things: cooperate or defect. Blue dots are cooperators; red dots are defectors; yellow dots are cooperators who converted to defectors; and green dots are defectors who converted to cooperators.
The model is set against a backdrop of moving clouds that are generated by a pixel shader, which is a program that runs on a graphics card and composes each pixel in a gridded pictorial field simultaneously, instead of calculating the position of the digital objects represented within that field. (Here, the white clouds are essentially mathematical noise—technically, Perlin noise with fractional Brownian motion applied.) In addition to…