In this Coding Challenge, I attempt an implementation of the A* pathfinding algorithm to find the optimal path between two points in a 2D grid. I begin by explaining the mechanics of how the algorithm works, look at pseudo-code, and then write the algorithm in JavaScript using the p5.js library for rendering.

Part 2 focuses on adding obstacles (walls) to the grid as well as functionality for moving diagonally.
.
In Part 3, I look at ways to improve the visual design and invite you to put your own spin on it.

Part 2:
Part 3:

Online demo:
Code:

To see the whole unedited version of this challenge:

Support this channel on Patreon:

Send me your questions and coding challenges!:

Contact:

A* Algorithm on Wikipedia:
Artificial Intelligence: A Modern Approach:
My Maze Generation Coding Challenge:

Source Code for the all Video Lessons:

p5.js:
Processing:

For More Coding Challenges:
For an Intro to Programming using p5.js:

Help us caption & translate this video!