Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / What is A* ?

Author
Message
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 15th Sep 2003 18:39
I've read about "A*" algorithms in another post. I guess it's something like recursive floodfill, but it seems more efficient.

Can someone explain me what is "A*" and teach me about its principles ?

Thanx

Ideas: memories of things which did not occur yet...
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 15th Sep 2003 19:29 Edited at: 15th Sep 2003 19:41
A* (pronounced A star) is a pathfinding algorythm that allows you find the shortest path between a and b no matter how convoluted or long the path is, if you can get from a to b then A* will find the path, it`s used in games to get the units in rts to get about, and sometimes used in action games to allow the enemies to get to you, you just feed the routine two positions and it finds a path from one to the other, cheers.

http://rajiv.macnn.com/tut/search.html
http://www.policyalmanac.org/games/aStarTutorial.htm

also check the A* code in the codebase


Mentor.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Sep 2003 22:54
Don't think that A* is the only search type that may be applicable for your game.

In actual fact, when I wrote that code in codebase I found that it didn't fit well if I had a choice of destinations. That was why I also added the flood search and added distance limits.

So if for example your Bot is low on health and knows the locations of say 4 health packs, you can do a single flood search and find the costs of all those health packs in a single step, rather than doing 4 separate A* searches.
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 16th Sep 2003 10:10
Thanks a lot!

The examples in the codebase use DBpro, with custom datatypes. I've got DB classic; do you think I can easily adapt the code for DB classic ? Some suggestions ?

Ideas: memories of things which did not occur yet...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Sep 2003 10:14
Ahhh, you might want to quickly nip over the the RGT forums instead then, quickly before the forum closes down.

I believe that there is DBC compatible code over there in their code snippets forum (look for pathfinding and A* in the titles).
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 16th Sep 2003 10:31
Err... What are RGT forums ? Where can I find them ?

Ideas: memories of things which did not occur yet...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Sep 2003 10:34 Edited at: 16th Sep 2003 10:34
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 16th Sep 2003 10:35
Thanx again!

Ideas: memories of things which did not occur yet...
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Sep 2003 12:20
On RGT, I think Asheron is the only one that made A* code compatible with DBC. Proteus' uses types, therefore DBP.

Login to post a reply

Server time is: 2024-09-21 01:07:31
Your offset time is: 2024-09-21 01:07:31