top of page

Space Boids And Bees

Technical Simulation of Game AI


This individual project explored Finite State Machines (FSMs) and heuristic driven behaviors in Unity through boiding behaviours and the Bee’s Algorithm.

It features two simulations: a beehive simulation, where drones act as bees and the mothership as the hive, and a predator-prey model, activated when the player engages, in which drones exhibit fear, hunger, and hunting behaviours to create a simple combat encounter.

Summary Of Work

Drones function as boid agents, moving according to position, orientation, mass, velocity, maximum force, and speed. Their behaviour is guided by cohesive forces, spatial awareness, and distance from the herd, allowing them to navigate the environment without collisions while maintaining swarm-like dynamics.

The mothership and drones use swarm intelligence, with the mothership employing Bee’s Algorithm to delegate tasks. Inspired by real bees’ foraging strategies, the algorithm uses recruitment, local search, neighborhood shrinking, site abandonment, and global search to optimize collective behavior.

image.png
image.png
image.png
image.png
image.png

Development Outcomes

This project provided a fun opportunity to  implement boiding behaviours, simulate swarm dynamics, and translate bee colony resource-harvesting into code. Combining Bee’s Algorithm with a predator-prey model demonstrated both natural swarm behaviour and dynamic player-combat interactions.

While I had previously explored using heuristic driven behaviors myself, this project provided a good opportunity to attack the same problems from a slightly different vector and learn some new tips and tricks along the way!

image.png
bottom of page