Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Why uses Intense Pathfinding pure Dijkstra and not A* #321285
04/27/10 21:54
04/27/10 21:54
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Hello,
On their site for Intense Pathfinding, thei wrote that it uses Dijkstra(fast...?!).
link

Thought A* is better. So why should someone use Dijkstra in anodebased system instead of A*?


Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Rackscha] #321295
04/28/10 00:28
04/28/10 00:28
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
"A* star is better than Dijkstra" is a statement equal to "A hammer is better than a nail pistol". You can compare these two only in terms of their results. And the results of both of them are equally good. Other than that they are totally different. A* is a heuristic search. Dijkstra is pure graph theory. In most cases the implementation of dijkstra algorithms is a little more slim than the A* ones. But there are even hundreds of variations of the dijsktra algorithm. As a rule of thumb A* can get faster results when you have really many nodes to search (that is why it uses heuristics). In scenarios where you've got medium or low number of nodes the choice of algorithm is a purely technical decision.


Always learn from history, to be sure you make the same mistakes again...
Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Uhrwerk] #321299
04/28/10 00:42
04/28/10 00:42
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
A* is valid for Big searches, as in RTS Gridbased pathfinding
with thousands of grids or nodes.

If you only have to search though a couple of hundred
nodes, any other algorythm is fast enough.

Then its better to take the most slim approach,
with the least overhead.

A pure pathfinding (creating the path of nodes)
is not really a performance eater nowerdays.
Other things like the players physics and
"traces" to avoid obstacles are of a bigger concern.

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Damocles_] #321335
04/28/10 11:25
04/28/10 11:25
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Ah ok, so for a Nodebased Level,
Dijkstra would fit?

@Uhrwerk: Ok the statement was a bit false^^.

Oh year and since we have pointed out the "slim" way...mh currently creating a quadtree search algorythm to find Nodes in the level without going through all nodes.
(like: find all nodes in a range of 100quants and check which of them is the nearest visible node to start from)

Do you think its worth it?

Greets
Rackscha



Last edited by Rackscha; 04/28/10 11:25.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Rackscha] #321337
04/28/10 11:41
04/28/10 11:41
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Searching though nodes is very quick,
so dont expect any notable performance improvment.

It also depends how often you do the search...

(dont optimize stuff that is quick already, it
just creates unnesesary complicated overhead)

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Damocles_] #321339
04/28/10 11:58
04/28/10 11:58
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I can only agree with Damocles. Don't waste time speeding up code thats already fast enough. That is really a hard task for programmers, I know, we always want it as good as it can be. But it's a waste of time. If you later find out that this is the reason for performance issues, go change it. But don't waste your time with that now.


Always learn from history, to be sure you make the same mistakes again...
Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Uhrwerk] #321395
04/28/10 20:42
04/28/10 20:42
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
So for now its better to have a linked list with all nodes and going through it to find suitable nodes, right?


Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Rackscha] #321407
04/28/10 23:02
04/28/10 23:02
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
If you use a linked list is another design decision. An array list may work as well. Though normally you don't use linked lists with a dijkstra algorithm. You use a graph. However, if you plan to use IntenseX just don't care what they do as long as it works. Or are you going to implement your own solution?


Always learn from history, to be sure you make the same mistakes again...
Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Uhrwerk] #321597
04/30/10 15:13
04/30/10 15:13
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Originally Posted By: Uhrwerk
Or are you going to implement your own solution?


Thats why iam talking about^^.
Did several A* algorythm in the past for learning. This time i want to complete it by starting from scratch and doing a system thatl work properly and move an entity.

And yes for the algorythm itself i use a graph, in A* i used Lists for open and closed lists for the nodes. HAve to look abit more into dijkstra if there is anbother difference as the heuristic.

In A*, i used ARRAY lists to store node sin open/closed list. When deleting a node in the middel of one of these lists, i had to modify all indexes >current index to avoid empty entries. With linked lists i could just delete a part of the chain and merge the rest together in no time.
If i remember right, i wont need random acces, so doing sequently is ok.

Greets
Rackscha

Last edited by Rackscha; 04/30/10 15:20.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Why uses Intense Pathfinding pure Dijkstra and not A* [Re: Rackscha] #321649
05/01/10 02:05
05/01/10 02:05
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Of course you can use A*. There is no reason against it except for the more on complexity you have to deal with. B.t.w.: You'll have a graph in both cases. You just happen to manage the graph in nodelists on the A* algorithm. But you also have to store the information which node is accessible from which other node. So you can't work around the graph with the A* algorithm.


Always learn from history, to be sure you make the same mistakes again...
Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1