This system is a chromatic representation of the idea of groupthink or assimilation. Agents adapt the colour of encountered neighbours, and increase in size according to how many similar-coloured neighbours they come across. The background serves as a visual representation of the current state of the agents as a species. Some agents remove colour and some add colour to the background, and its colour is determined by averaging the colours of all agents in the system.
It's interesting to watch how long it takes for one colour to take over the entire system, and it's interesting to watch groups of agents explode in pockets and then return to their tiny sizes. It's also fun to try and figure out which colour will "win" as it's often surprising how quickly a colour can take over, even if there's only one agent who has that colour.
Agents in this system wander aimlessly until they find neighbours with whom they can wander. Agents travel in packs, and stay a certain distance from one another, but their size is also determined by how many neighbours they have. The combination of these two rules creates a push-and-pull behaviour where groups of agents rapidly increase in size, and then push all of their new neighbours away because they now need more personal space.
The scene is also driven largely by colour, with each agent being born a random colour, and taking on the colour of neighbours it encounters. This colour-assimilation behaviour in conjunction with the neighbour-count-dependent size of agents creates an interesting "game" that unfolds. Usually, one colour will eventually take over the entire population and every agent adopts that colour.
The background tracks the progress of this interplay between agents. An average of all agents' colours is calculated and applied to the background on every update. Half of the agents are "removers" who remove colour from the background as they pass through it, and the other half are "adders" who add colour to the background as they pass through it. The hardest technical part of the project was balancing the growth of agents when they had several neighbours. The thresholds are very finicky and it can quickly devolve into a system of oversized agents all pressed against the glass and struggling for air.
It was also difficult to find a balance that allowed for the background to grow and diminish in such a way that it almost never became completely full of colour.
I would like to add more interesting behaviour for the agents than just an aimless wander. I could add some sort of behaviour based on the background, and also multiple backgrounds representing different elements of the system.