Every dot is a simple particle. The only thing it knows is how much it likes or dislikes each color. Nothing tells it to form shapes, chase anything, or build structures.
Even so, patterns start to appear on their own: clusters, swarms, cells, and things that look alive. It is a small example of how complex behavior can come out of very simple rules.