Skip to main content
gamedev.net
🔒 Locked

pathfinding help!

Started by mehdi0016 Jun 29, 2008 at 1:25 PM 3 replies 1.2k views
Original Post
mehdi0016
mehdi0016
hi i have some question about pathfinding. now, i learn some about A* and Dijkstra, but for city pathfinding program(not a game) what's your suggestion ? which algorithm is better? also i need some info about Ant Colony Optimization. how could it help ? thanks.
Kylotan
Kylotan
Pathfinding in a real city isn't necessarily any different from doing it in a game. A* and Dijkstra both work well in their respective ways. What will work best for you depends on your exact need.

There's some reasonable information on ant colony optimisation on Wikipedia, including links to references. Is that sufficient?
1hod0afop
1hod0afop
I recommend IDA* algorithm for games. It's a variant of A* which searchs in depth-first mannar. It's a bit complex than A* but has some nice features.

You can find details here:
http://www.gamasutra.com/features/20000626/brockington_01.htm
mehdi0016
mehdi0016
well, i try to implement A* now. but how can i handle one way road or street ?
any idea?
Kylotan
Kylotan
A* has a part where it generates successor nodes for the current node being examined. When you generate these nodes to explore in the future, don't generate them for areas where you would need to pass down a one way street to get there.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.