Simulation of BOID type behaviours in Unity environment


The study describes and characterises BOID (bird-oid object) type behaviours, consisting of joint movement of a cluster of objects with the same properties. Authors presented Reynolds’ model, which takes into account 3 rules: separation, alignment and consistency, as well as the control procedures of a cluster of objects suggested by Parker, considering such variables as wind, aim, speed, order and the occurring forces. The test method was to conduct simulation experiments with different configurations of coefficients of the forces controlling the model. For each simulation the time of moving from the start point to the end point was measured. A hundred simulations were carried out for each individual group of coefficients, and then, using the described statistics methods, generalised time values were determined. This allowed a comparison of the results and made a conclusions. The numerical simulations carried out were implemented in Unity environment. Calculating the time required for travelling the same route was done by changing the value of the separation force, cohesion, alignment and avoidance. From the values obtained, it can be seen that the biggest influence on the increase of the time of moving BOID objects, is increasing value of the coefficient of separation and levelling forces. Unity environment is well suited to conduct such simulations, since it allows to obtain both numerical values and process visualization as a 3D image. In addition, Unity allows to create individual scripts to manage simulation in individual IDEs, and consists reliable documentation, which simplifies their writing.


BOID; simulation of BOID behaviour; Unity environment

[1] C. W. Reynolds: Boids. Background and Update:, dostęp: 2016.10.10.
[2] Clerc M., Kennedy J.: The Particle Swarm – Explosion, Stability, and Convergence in a Multidimensional Complex Space [W]: IEEE Transactions on volutionary Computation. Volume 6, 1, Feb 2002
[3] R. Mendes, J. Kennedy, J. Neves: The Fully Informed Particle Swarm: Simpler, Maybe Better [W]: IEEE Transactions on Evolutionary Computation, olume 8, 3 June 2004
[4] C. Hartman, B. Benes: Autonomous boids: Computer Animation and Virtual Worlds, 2006, Volume 17
[5] M. Wagner, W. Cai, M. H. Lees: Emergence by Strategy: Flocking Boids and Their Fitness in Relation to Model Complexity: Simulation Conference (WSC), 8-11 Dec 2013
[6] S. Alaliyat, H. Yndestad, F. Sanfilippo: Optimisation of Boids Swarm Model Based on Genetic Algorithm and Particle Swarm Optimisation Algorithm (Comparative Study):, dostęp: 2016.10.10.
[7] K. Szwaykowska and I. B. Schwartz, L. Mier-y-Teran Romero, C. R. Heckman, D. Mox and M. Ani Hsieh: Collective Motion Patterns of Swarms with Delay Coupling: Theory And Experiment:, dostęp: 2016.10.10.
[8] C. W. Reynolds: Steering Behaviors for Autonomous Characters: cwr/steer/gdc99/, dostęp: 2016.10.10.
[9] Reynolds C. W.: Flocks, Herds, and Schools:A Distributed Behavioral Model. Computer Graphics, 1987, Nr 21(4)
[10] C. Parker: Boids Pseudocode: pseudocode.Html, dostęp: 2016.10.10.

Published : 2017-03-30

Lypovyi, T., & Montusiewicz, J. (2017). Simulation of BOID type behaviours in Unity environment. Journal of Computer Sciences Institute, 3, 23-27.

Taras Lypovyi 
Institute of Computer Science, Lublin University of Technology, Nadbystrzycka 36B, 20-618 Lublin, Poland  Poland
Jerzy Montusiewicz
Institute of Computer Science, Lublin University of Technology, Nadbystrzycka 36B, 20-618 Lublin, Poland  Poland