AI Formations

This was a solo research project where I made a group of agents follow the formation drawings the player made on the ground. These drawings could be anything you could draw in 1 brush stroke and the agents would space themselves evenly across the drawing.
To prevent agents walking in each other’s way and making the distance they needed to walk as small as possible, I implemented the Hungarian algorithm to make point assignment across all agents as efficient as possible.
Agents would also take walls into account and not try to path find into said obstacles.

In this project I learned to use mathematical algorithms on systems where you wouldn't expect them to be useful at first glance.
I used the Hungarian Algorithm in this project so that the different agents would each select the most efficient point to move towards, keeping the positions and options of the other agents in mind.
The result was a coherent group of agents moving as smoothly as possible in group. As you can see in the video, the top showing the result before applying the algorithm, and the bottom showing the result after the algorithm is used.

Link to the project