

The first thing you should notice is that we have divided our search area into a square grid. This is illustrated below, with green being the starting point A, and red being the ending point B, and the blue filled squares being the wall in between. Let’s assume that a wall separates the two points.

Let’s assume that we have someone who wants to get from point A to point B. It also contains executables if you just want to see A* in action.īut we are getting ahead of ourselves. The sample package contains two versions: one in C++ and one in Blitz Basic.

As you might expect, however, I have included a link to a sample program at the end of this article. You should be able to adapt what's here to any computer language. Links to some of the best are provided at the end of this article, under Further Reading.įinally, this article is not program-specific. Instead it describes the fundamentals and prepares you to go out and read all of those other materials and understand what they are talking about. This article does not try to be the definitive work on the subject. While there are many articles on the web that explain A*, most are written for people who understand the basics already. The A* (pronounced A-star) algorithm can be complicated for beginners. See email address at the bottom of this article. This article has been translated into Albanian, Chinese, French, German, Portuguese, Romanian, Russian, Serbian, and Spanish. By Patrick Lester (Updated July 18, 2005)
