YAPF - Testers needed!

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

DW
Engineer
Engineer
Posts: 10
Joined: 28 Apr 2006 22:53

Just a compliment

Post by DW »

Just wanted to give my compliments :) CPU load is noticably lower compared to NPF :D

GrEeTz DW
cabbit
Engineer
Engineer
Posts: 44
Joined: 01 Oct 2005 05:28

Post 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?
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post 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
cabbit
Engineer
Engineer
Posts: 44
Joined: 01 Oct 2005 05:28

Post 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.
Attachments
annoying2.jpg
annoying2.jpg (145.99 KiB) Viewed 8074 times
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

cabbit: from the picture i can't see why it happens. Can you please upload savegame?

thanks
KUDr
cabbit
Engineer
Engineer
Posts: 44
Joined: 01 Oct 2005 05:28

Post 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.
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post 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.
cabbit
Engineer
Engineer
Posts: 44
Joined: 01 Oct 2005 05:28

Post 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.
Attachments
Worksnot2.sav
Hopefully the correct savegame
(107.85 KiB) Downloaded 345 times
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post 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.).
User avatar
misnomer
Engineer
Engineer
Posts: 29
Joined: 24 Jul 2004 13:03

Post 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.)
Attachments
bugg.JPG
bugg.JPG (297.43 KiB) Viewed 1113 times
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post 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?
User avatar
misnomer
Engineer
Engineer
Posts: 29
Joined: 24 Jul 2004 13:03

Post by misnomer »

Yeah. They're the depots I made the trains in in the first place!

Here's the save.
Attachments
Hey Guys, 14th Apr 1954.sav
(709.51 KiB) Downloaded 377 times
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

misnomer: fixed (r4634)

many thanks
KUDr
6th
Engineer
Engineer
Posts: 6
Joined: 29 Dec 2005 18:38

Post 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:
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
6th
Engineer
Engineer
Posts: 6
Joined: 29 Dec 2005 18:38

Post 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.
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

6th: Zip file updated (hopefully with the proper lang file now)
KUDr
6th
Engineer
Engineer
Posts: 6
Joined: 29 Dec 2005 18:38

Post by 6th »

Thanks again guys. Champions.
Mindrila
Engineer
Engineer
Posts: 4
Joined: 08 May 2006 18:31

Post 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?)
Attachments
Arsenal Transports, 12th May 2026.png
Arsenal Transports, 12th May 2026.png (45.72 KiB) Viewed 7420 times
DW
Engineer
Engineer
Posts: 10
Joined: 28 Apr 2006 22:53

Strange train...

Post 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..
Attachments
DW InterTrans, 12th Oct 2090.JPG
(447.67 KiB) Downloaded 344 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests