top of page

I've developed a library for Unity which boasts of AI functionality such as seek and flee steering behaviour, obstacle avoidance, flocking behavior, A-Star path finding, State-Machines, Behavior trees and Game trees.

Flocking Behavior:

The following video demonstrates flocking behavior, also know as boid behavior. Each entity decides its motion based on neighboring entities. This motion is governed by three forces: Alignment, Cohesion, and Separation. The weights for these forces are adjustable by the sliders on the left side.

Behavior Trees:

I've implemented a simple capture the flag game using behavior trees. The states and intents of each entity can be seen on the left in the following video. They're divided into two types: the attacker and the defender.I've attached an image of the behavior tree for my attackers.

A-Star Path Finding:

I've implemented A-Star path finding in the following video. The two colored squares represent the start and end points of the path. The gray areas are inaccessible. The blue sqaures denote nodes on the closed list, and the red ones denote nodes on the open list.

Obstacle Avoidance:

The entity in the following video tries to avoid all the blue spheres, by exerting a force away from their centers. The velocity vector is shown in green, while the force vector is shown in red

Game Trees:

I made a modified Tic-Tac-Toe game, which uses a 6X6 board. Points are gained for matching 4 blocks in a row, column or diagonal. The opponent AI analyses all board states upto 6 moves into the future, and chooses the one which suits him the best

 

Pursue and Evade Behavior:

In the following video, the orange entitiy tries to estimate the position of the target ( the dark blue dot) based on its velocity, and moves towards this calculated position, so as to intercept the target. The light blue entitiy on the other hand, flees this future position. 

Mass A-Star:

The following video has a large number of entities perform A-Star, by randomly choosing spots on the map as their destinations. Once they reach their destination, they seek a new destination. The green nodes are jungles, and have a weight of 3 ( it takes thrice as longs to go through them) while the brown ones are swamps, and take 5 times as long for the entities to cross. This is taken into accoung in the A-Star, and the entities can be seen avoiding these locations.

I'm a paragraph. Click here to add your own text and edit me. I’m a great place for you to tell a story and let your users know a little more about you.

Treasure Hunt using State Machines:

The entitiy in the following video needs to posses a key of a particular color before it can open a door of the same color. You can observe how it changes states to obtain the particular key, and proceeds to obtain the treasure ( the light blue square)

Genetic Algorithms:

The following video is a demonstration of genetic algorithms. The tanks are initially given random weights for their treads. They collect the mines when they pass on them. Every 30 seconds, a new generation is spawned. The ones who collected the most mines have more chances of having their genes used for the future generations. The one with the most mines is considered elite, and proceeds to the next generation as is.

bottom of page