Skip to content

Demonstration of the A* Algorithm with an 8 directional movement system.

Notifications You must be signed in to change notification settings

Jesse-Cooper/algorithm-aStar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

A* Algorithm

This project demonstrates an application of the A* algorithm in an 8 directional movement system.

Application

A C program that displays randomly generated dungeon configurations and find the shortest path between two point using A* is provided.

Uses the seed 7907.

Invoking Instructions

The program can be compiled using the Makefile (compiled with make) and run with ./program.

Press Q to quit. Press ANY KEY (other than Q) for a new dungeon configuration. The terminal size must be at least 72x24 for the program to run.

Dungeon Generation

Dungeon configurations are generated by randomly placing points and drawing lines of varying sizes between them.

Pathfinding (A* Algorithm)

For each dungeon configuration the shortest path between its source and target is found using the A* algorithm in an 8 directional movement system.

An approximation (using integers) of octile distance is used as the heuristic which will never overestimate the actual path cost making it admissible.

About

Demonstration of the A* Algorithm with an 8 directional movement system.

Topics

Resources

Stars

Watchers

Forks