A* Pathfinding/Flocking

These two projects was parts of a course in behavioral AI programming at Uppsala University. The projects where created using the Unity Engine with the help of C#.

 

Flocking

This assignment was intended to challenge me to create my first AI behavior. There was to be entities that acted and reacted on each other based on their wants and needs. What i have created is a circle of life with three different entities. Grass that grows with time, sheep that eat the grass and wolves that eat the sheep. Adding to those needs i’ve given the sheep ‘wants’. They want to be close to other sheep, while simultaneously flee from prowling wolves.

https://drive.google.com/open?id=1GU4SMQhwUFAlpHaa7t3m8kbM7UwqRY9Z

A* Pathfinding

This project was the second assignment in the course. Here the aim was to create a pathfinder that uses Peter Hart, Nils Nilsson and Bertram Raphael‘s A* algorithm. A searching object is to find the best path to the goal object. I constructed this algorithm in a 2D environment in the Unity Engine. In order to calculate distance i used the manhattan distance from the starting node to the destination node. From there it is designed to find the path with the lowest cost in order to efficiently traverse the map.

https://drive.google.com/open?id=1d1dQVY6pS7Ojq4zz14VTbKdllShT4W6c

About Christoffer Tornstråle

2015 Programming