Simon’s full-screen take on Flocking, based on Chapter 6 from The Nature of Code (Autonomous Agents). The code comes from Daniel Shiffman’s tutorial Combining Behaviors: Flocking.
In Simon’s words, Autonomous Agents need to have action/ selection, steering (for example, for Flocking you need Separation, Alignment, Cohesion programmed using the neighbours, desired and current velocity) and locomotion (position, velocity, acceleration, “own vector stuff” or a physics library).