Note: discontinued and incorporated into larger project here: https://github.com/tjards/swarming_sim
This project implements Reynolds Rules of Flocking (or Boids), which is based on a balance between three steering forces:
- Cohesion: the tendency to steer towards the center of mass of neighbouring agents
- Alignment: the tendency to steer in the same direction as neighbouring agents
- Separation: the tendency to steer away from neighbouring agents
Reynolds (1987) did not provide equations for the steering forces above, so we have taken some artistic liberty and had a bit of fun. In the results section, you will see variations on how "neighbours" are defined. We demonstrate free flocking and flocking to escort (i.e. following a reference). A more formal definition and analysis of flocking was provided by Olfati-Saber (2006), which we have implemented here .
The code is opensource but, if you reference this work in your own reserach, please cite me. I have provided an example bibtex citation below:
@techreport{Jardine-2021, title={Reynolds Rules of Flocking for Tactical Escort'}, author={Jardine, P.T.}, year={2021}, institution={Royal Military College of Canada, Kingston, Ontario}, type={Technical Report}, }
Alternatively, you can cite any of my related papers, which are listed in Google Scholar.
This work is related to the following research:
-
Craig W. Reynolds, "Flocks, herds and schools: A distributed behavioral model", ACM SIGGRAPH Computer Graphics vol. 21, pp. 25–34, 1987.
-
Reza Olfati-Saber, "Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory", IEEE Transactions on Automatic Control, Vol. 51 (3), Mar 2006.
Below are several animated plots showing the behaviour of the flock.