Page 2 of 12

Just a compliment

Posted: 28 Apr 2006 22:55
by DW
Just wanted to give my compliments :) CPU load is noticably lower compared to NPF :D

GrEeTz DW

Posted: 28 Apr 2006 22:59
by cabbit
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?

Posted: 28 Apr 2006 23:56
by KUDr
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).

Thanks
KUDr

Posted: 29 Apr 2006 19:10
by cabbit
This isn't a 'killer' bug, but is slightly annoying; these steel trains are not choosing the most effiecient route to the station.

I try to post a simplified version too.

Edit:

YAPF = 2 for all vehicles, this bug does not occur with NTP

Edit #2:

I can't seem to reproduce this bug in a simplified format, I'm just going to upload the savegame.

Posted: 29 Apr 2006 20:03
by KUDr
cabbit: from the picture i can't see why it happens. Can you please upload savegame?

thanks
KUDr

Posted: 29 Apr 2006 20:32
by cabbit
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.

Posted: 29 Apr 2006 21:36
by KUDr
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.

Posted: 30 Apr 2006 00:17
by cabbit
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.

Posted: 30 Apr 2006 07:33
by KUDr
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.).

Posted: 30 Apr 2006 14:39
by misnomer
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.)

Posted: 30 Apr 2006 16:04
by KUDr
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?

Posted: 30 Apr 2006 17:44
by misnomer
Yeah. They're the depots I made the trains in in the first place!

Here's the save.

Posted: 30 Apr 2006 20:40
by KUDr
misnomer: fixed (r4634)

many thanks
KUDr

Posted: 01 May 2006 11:24
by 6th
Could I get some help regarding getting an YAPF exe to work?

I use the language file and executable included the first post but get the error "Invalid version of laguage packs"

It appears to be the exe, as when i simply us the old exe and the new language file it works - but i wanna test YAPF too. :cry:

Posted: 01 May 2006 11:59
by XeryusTC

Posted: 01 May 2006 12:11
by 6th
Thanks mate, much appreciated.

I had to add 2ccmap.grf - but that's no problem.

It would appear the .exe knows what to do.

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.

Thanks again.

Posted: 01 May 2006 18:41
by KUDr
6th: Zip file updated (hopefully with the proper lang file now)
KUDr

Posted: 06 May 2006 09:08
by 6th
Thanks again guys. Champions.

Posted: 08 May 2006 18:48
by Mindrila
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?)

Strange train...

Posted: 08 May 2006 21:05
by DW
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..