Skip to content

Simulating the behaviour of schools of fish using the flocking algorithm

Notifications You must be signed in to change notification settings

IsaacYu15/Boids-Flocking-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

FLOCKING ALGORITHM

Final Demo: here!

This project aims to re-create the behaviour of schools of fish based upon the core principles of the flocking algorithm:

  • alignment (each fish will try to align them selfs with neighbouring fish)
  • cohesion (fish will try to swim / group together)
  • avoidance (fish are not allowed to bump into one another)
  • bounding (fish must stay within a certain region) with each of these behaviours having a weight/importance scale for each fish.

Flocking algorithms are useful when it comes to re-creating group behaviour as each unit is allowed to "think for it's own / adapt to it's surroundings" rather than following a pre-defined path or having a singular parent manage them all.

FUTURE POINTS OF EXPLORATION

  • A better way to determine the weights for alignment, cohesion, avoidance, and bounding
  • External motivations (e.g. if a shark swims towards the fish, they should avoid the shark and re-group when the shark is gone)
  • Schools of fish can follow a spline instead of just staying within fixed boundaries

BUILT USING

  • Unity - A game engine designed for real-time 3D & 2D projects

PREREQUISITES

TRY IT YOURSELF!

  1. Download the project as a ZipFile
  2. Unzip the file
  3. Open up the UnityHub and select the project

About

Simulating the behaviour of schools of fish using the flocking algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages