Pathfinder problem
Moderator: OpenTTD Developers
Pathfinder problem
Standard pathfinder is terrible slow. Is it possible to reduce time needed to find path?
Last edited by Kogut on 27 Aug 2009 22:14, edited 2 times in total.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Patchfinder problem (too slow)
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.
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.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Patchfinder problem (too slow)
- Is it possible to do it in original pathfinder?Yes by accepting to not always find the best path.
- I need a rail patchfinder.
Last edited by Kogut on 26 Aug 2009 07:40, edited 1 time in total.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patchfinder problem (too slow)
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.
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.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Pathfinder problem (too slow)
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)
Another problem - rail patchfinder "think" that is impossible to build on tracks of his own company. 

Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Pathfinder problem (too slow)
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).Kogut wrote:Another problem - rail patchfinder "think" that is impossible to build on tracks of his own company.
Re: Pathfinder problem
So... It is not a bug. It is a feature...
Interesting
Interesting
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Pathfinder problem
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.).Kogut wrote:So... It is not a bug. It is a feature...
Interesting
Who is online
Users browsing this forum: No registered users and 2 guests