Page 1 of 1

Pathfinder problem

Posted: 26 Aug 2009 06:36
by Kogut
Standard pathfinder is terrible slow. Is it possible to reduce time needed to find path?

Re: Patchfinder problem (too slow)

Posted: 26 Aug 2009 06:48
by Zuu
Yes by accepting to not always find the best path. (best according to some criteria or target function)

If you further accept that the algorithm may not always find a result, then you can get even faster path finding.


If you specify if you are interested in path finding for rail or road you might get more specific answers for that transport mode. Though the general answer above applies to both rail and road.

Re: Patchfinder problem (too slow)

Posted: 26 Aug 2009 07:21
by Kogut
Yes by accepting to not always find the best path.
- Is it possible to do it in original pathfinder?

- I need a rail patchfinder.

Re: Patchfinder problem (too slow)

Posted: 26 Aug 2009 07:34
by planetmaker
Please mind, that any search you carry out will be much more successful, if you search for path finder instead of patch finder - two vastly different words.

There are some AIs out there which use a non-perfect path finder in order to be quicker. Have a look through the existing ones, I don't remember which it was, though.

Re: Pathfinder problem (too slow)

Posted: 26 Aug 2009 16:26
by Michiel
ChooChoo does - just a one line change. Search for multiplier in pathfinder.nut. A higher multiplier trades "optimality" for speed - higher makes it faster.

Re: Pathfinder problem (too slow)

Posted: 27 Aug 2009 22:14
by Kogut
Another problem - rail patchfinder "think" that is impossible to build on tracks of his own company. :(

Re: Pathfinder problem (too slow)

Posted: 27 Aug 2009 22:20
by Yexo
Kogut wrote:Another problem - rail patchfinder "think" that is impossible to build on tracks of his own company. :(
That's not a problem, that's by design. If you want to reuse your own tracks you'll have to create your own pathfinder (one that does keep signals in mind).

Re: Pathfinder problem

Posted: 27 Aug 2009 22:27
by Kogut
So... It is not a bug. It is a feature...
Interesting

Re: Pathfinder problem

Posted: 27 Aug 2009 22:30
by Yexo
Kogut wrote:So... It is not a bug. It is a feature...
Interesting
Just joining two tracks doesn't make you able to run 2 trains on it. You have to place correct signals too. Now please explain to me how a generic rail pathfinder should work that supports signals and how it can detect where it's allowed to join tracks, and how to detect a two-way station<>station line (you can't join there, or that train won't be able to run.).