I don't care how it's done, but the I think the Ship path finder could use some improving.
By the way, is there any particular way I should be testing YAPF, or should I just play like I'd play a normal game and report if something odd happens?
cabbit: Yes, set the YAPF type = 2 for the transport type you want to play with and just play. If you will notice something odd, try to isoalate it in minimal case (lowest possible number of tracks, trains, etc). Then upload savegame and describe the problem. You can do that here or prefferably create bug at http://bugs.openttd.org/ (Category = YAPF).
KUDr wrote:cabbit: from the picture i can't see why it happens. Can you please upload savegame?
thanks
KUDr
I created a bug report at the link you sent me. I posted two savegames there, one with the original setup and one with a slight modification which caused the trains to take the correct path.
cabbit: what revision do you use? I can't reproduce it. Your savegame is just after it happened and if i return the train back, then it chooses right way. I suspect some magical energies or you have something different then me.
Can you help me to reproduce it please?
EDIT: OK, I was able to repro this under very specific cimcurstances:
One train entering the station causing red on all presignals. Then it happen that first 10 signals on the longer (less optimal) path are all green, but on the shorter not. This causes the look-ahead feature to trigger load balancing and force the second train to choose the longer path (that is considered as free - first 10 signals are green).
There are generally two solutions for this:
1) If it is so annoying, then the look-ahead feature can be optional (default value OFF)
2) you can add 2 more signals to the 'better' path and the second train will choose the right track in this case.
I'm sorry about this, but I think I saved over the first saved game and gave you duplicate copies of the savegame that worked most of the time.
It seems obvious to me (if I was driving that train) that I should be taking the bottom branch; otherwise I have to go out of my way and double-back. The original NPF seems to agree with me.
But in order for me to get YAPF to agree with me I need to make the upper branch go further out of the way.
Once the look-ahead will be switchable, you will not have such problems.
You can tune the behavior in several ways now. Delete the road crossing the track on bottom. Or build one road piece over the upper track. There are many minor differencies between pathfinders in the path cost calculation so don't expect that all pathfinders will behave the same. YAPF is more complex with that look-ahead and of cource it has some limitations like that it doesn't recognize that these two ways will join back to one with different number of signals passed.
Try to take it from the other side too: you, as the driver, can see the red signal in the station entry and you know, that it could be better to take bit longer path and have bigger chance to pass that signal without braking than to go directly ahead and more likely stop the train and block all the traffic behind. This is what that look-ahead should do. Balance traffic by taking longer path whenever it can prevent traffic jams. I agree that it can look dumb in such cases, but you are your own track designer and you can tune its behavior easily (using additional signals, level crossings, etc.).
There seems to be some kind of bug with finding a depot through a station in my game. YAPF is set to 2 and using the latest version and stuff. It should be clear what's going wrong. Can upload a save if needed.
(Edit - of course, it may just be some screwup on my end. I've only just got back into OpenTTD so I'm not totally sure if I've "set it up" right or whatever, I guess.)
misnomer: thanks for another bug report. Yes it looks obvious how to reproduce it, but it works for me. I would appreciate your savegame exactly at the position on your picture.
thanks, KUDr
Edit: forgot to ask: are you sure your two depots in front of station are also elrail?
If i add 2ccmap.grf to openttd.cfg I receive an error, if i remove it from the cfg file (still leave it around in ./newgrf) and run the new exe it works.
Hey there, great work with YAPF now my game is not stuttering anymore like with NPF (And that with an Athlon 64 @2,6 GHZ oO)
Now i encountered 2 problems with ships:
1. With Yapf only enabled an set to 2 or 3 (doesnt matter), the ships can't travel long distances without buoys and even a shipyard right next to the oilplatform is too far away (see screenshot) when i enable NPF i can select the yard.
2. If i set Yapf for ships to 3, the game slows down to like what it was without yapf. (shall i include a savegame? or is it just clear what i mean?)
Attachments
Arsenal Transports, 12th May 2026.png (45.72 KiB) Viewed 8902 times
Got a weird problem here... (i know... i'm using crossing tunnels...) The train at the bottom left waits for a red signal, while the other signal is green (which it also was when the train entered the block)... can someone help me?? I use the latest YAPF build..