An open API service indexing awesome lists of open source software.

https://github.com/ourcade/algorithms-a-star-pathfinding

Example implementation of A* algorithm in JavaScript with an accompanying YouTube explanation video!
https://github.com/ourcade/algorithms-a-star-pathfinding

a-star-path-finding a-star-search algorithms astar-algorithm astar-pathfinding breadth-first-search gamedev javascript modern-javascript

Last synced: 2 months ago
JSON representation

Example implementation of A* algorithm in JavaScript with an accompanying YouTube explanation video!

Awesome Lists containing this project

README

        

# A* Pathfinding
> Example implementation of A* algorithm in JavaScript

![License](https://img.shields.io/badge/license-MIT-green)

## Overview

This is and example showing the implementation of the A* search algorithm within a 2D grid. An implementation of Breadth-first Search is also included to show how A* builds on top of those ideas.

You can find explanations of the code in these videos on YouTube:

- [Pathfinding with Breadth-first Search](https://youtu.be/CL_AhHhjZ7Y)
- [A* Star Search for Pathfinding](https://youtu.be/nFAvgeYPwZc)

The code uses modern JavaScript and the Pencil.js library to render squares and show what the algorith does each iteration.

## Getting Started

Clone this repository with git and run:

```
npm install
npm run start
```

Then go to http://localhost:8000

## License

[MIT License](https://github.com/ourcade/algorithms-a-star-pathfinding/blob/master/LICENSE)