This was an implementation of a state machine AI utilising a flocking algorithm.
It was created as part of an AI module assignment for the University of South Wales.

Download the source code, and run in unity 2019 in order to tweak settings, as well as visualise the detection algorithm.

The flock goes between four states:

  1. Group Flight
  2. Seeking Water
  3. Drinking
  4. Dispersing

It loops in that order once each condition is met.

This implementation features no obstacle avoidance or collision detection, and is single threaded (performance may be slow on less powerful CPU's). 

Download

Download
Flocking State Machine.zip 186 MB

Leave a comment

Log in with itch.io to leave a comment.