Pathfinding with Terrain Analysis

For this project I implemented the A* algorithm for pathfinding.
The program supports different options that can be configured to tweak the algorithm’s functioning.
Along with it I implemented different Terrain Analysis functions in order to modify the node’s weight depending on a given Terrain Analysis heuristic. (e.g. Visibility, Openness, etc.)

Project Overview

The program features an AI agent that can traverse the map given a destination point (by clicking on the screen).
The path is computed by using the A* algorithm, and different features have been implemented that can be configured:

  • Rubberbanding and Smoothing can be applied as a post-process computation to visually improve the path that the agent will be following.

  • Different Heuristic computation functions: Euclidean, Octile, Chebyshev and Manhattan.

  • Adjustable weight for the cost of the nodes.

  • Option to toggle the algorithm to be computed among multiple frames to make it’s visualization easier.

  • Different terrain analysis functions that can affect the pathfinding depending on a given heuristic. This could be used for a game AI agent that needs to take a path that maximizes stealth, for example.

By using the previously mentioned principles, I could end up having two agents on the map that play Hide and Seek.
The agent hiding is going to try to escape from the pursuer by taking paths with low visibility. While the pursuer is going to try to catch it by following its last known position, and exploring the nearby area.

Other Projects