My Processing project trying to replicate the particle system that showed complex behaviour as a result of simple rules in https://www.nature.com/articles/srep37969
You will have to download the entire primordialParticleSystem and open the pde file in Processing to run this.