I recently did an implementation of the

**A* algorithm**. I'm pretty satisfied with the result as this is my first real 'adventure' in the area of AI (I have been programming for about 7 years). The implementation delivers results pretty quick and accurate.

While implementing a question came to mind,

**how fast is fast?**

Here are some images of the implementation in practice:

Agent moving a long distance

Agent moving through a maze

Two videos showing the implementation in practice:

Video 1

Video 2

To see how fast my implementation worked I did a stresstest. I made the program calculate thousands of paths from random startpoints to random endpoints in my grid. I did this in an empty grid of 40 by 23, an obstacle-filled grid of 40 by 23 and an empty grid of 100 by 100.

These are the results:

40 by 23, no obstacles

100 by 100, no obstacles

40 by 23, difficult terrain

Note that I'm mainly concerned about the average calculation time, as you can see, at the 40 by 23 grid with a difficult terrain there is an average calculation time of about 8ms. Also note that I don't have diagonal search, only horizontal and vertical.

My question to the GameDev boards;

**Is this an acceptable speed, can it be categorized as fast, or slow?**

Discuss...

Thanks in advance,

Yuri van Geffen