Home » Community » Forums » » A* Pathfinding for Beginners
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 A* Pathfinding for Beginners
Post Reply 
Nice article, very clear and concise, thanks!

-------------------------------------------
Here's to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes, the ones who see things differently.
-------------------------------------------

 User Rating: 1743   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Oh, that images really make me wanna do something better for my future articles.

Thanks for describing A* in such an elegant way

Albert "thec" Sandberg


 User Rating: 1075   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

This is an excellent article! I had never done any pathfinding before, but after reading this article I was able to understand and implement the A* method and I'm already getting ideas about terrain weighting and stuff. Thank you so much!

 User Rating: 1153   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

An excellent and well-written article, the perfect introduction into one of the harder parts of game development to get your head around.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Great article!

thanx for writing it!

}-- Programmer/Gamer/Dreamer --{

 User Rating: 1352   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Very well written article. I really appreciate it and it's valuable.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

It has been brought to my attention that the method used for calculating H in this article is inadmissible. As a result, while the method will almost always give the shortest path, it may not in all situations (though in such cases it will come close).

Technically, the Manhattan method would be admissible had it been a 4-way pathfinding example, instead of an 8-way pathfinding example

The latest version of this article, which notes this and includes a few other changes, can be found here:
http://www.policyalmanac.org/games/aStarTutorial.htm

And thanks for the kind remarks!

- Patrick Lester


[edited by - turtle1776 on April 21, 2004 11:29:57 PM]

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

great thanks !!!

 User Rating: 1015    Report this Post to a Moderator | Link

Another correction: In the version of the article here on Gamedev, the method says you can stop the search when the target node is added to the open list. Really, you should wait until it is added to the closed list.

This correction has been made to the version of the article found at:
http://www.policyalmanac.org/games/aStarTutorial.htm

Permission is granted to GameDev to transfer the latest (July 18, 2005) version of the article here.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Hi
When trying to run the code, the compiler dont regognise among other things this:

"lpdirectdrawsurface7"

It does find ddraw.h, but its from the package dxsdk_feb2005.zip. Could there be a compatible problem or did i forget to include something? This package is newer then the dx7 package suggested by the author of the article.

Thanks a lot for any clearification.

 User Rating: 943   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I used this in my term project, which was Maze(police and thief). I used that algorithm for police. But I have a question now. Can I use the same algorithm for the thief? I mean, I will try to find the longest path to the police,so the target will be the police. And i will choose that road to find the loops. But is it ok? can anyone help me? Thank u for this wonderful tutorial. Helped me so much..

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by burakkilic
I used this in my term project, which was Maze(police and thief). I used that algorithm for police. But I have a question now. Can I use the same algorithm for the thief? I mean, I will try to find the longest path to the police,so the target will be the police. And i will choose that road to find the loops. But is it ok? can anyone help me? Thank u for this wonderful tutorial. Helped me so much..
i didnt try but, cant you calculate a* for the positions and current position that thief may go, then select the longest one to move him; so that the police's road doesn't get shorter. because of it may make endless loop with certain positions, you can calculate and use paths at different random frequencies. i mean not at every cycle.

 User Rating: 1079   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: