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

User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

I say replace completely. This was what I meant when I italicised instead in my last post. Days in travel doesn't mean lost, at all, when using a complete pathfinder. It just means it's taking a long time to get there.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

- Coding style update
- Replaces the original "train is lost" logic
- New patch setting (bool) replaces the old one (uint16)

Edit: * r6800 /trunk/ (8 files in 3 dirs): -Feature change: [train is lost] message is now generated immediately when pathfinder can't find the path. (thanks MeusH, peter1138 and Brianetta for ideas and help).
Attachments
pf_based_train_lost_msg_3.diff
PF based "train is lost" message
(10.64 KiB) Downloaded 271 times
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

That's great!
Now, I'll go and play :P
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

Correct me if I am wrong: If i decide to redisign my current network on which i have 200+ trains and i cut the lines I will get 200 messages for lost trains because they can not find the route to the destination.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
User avatar
Invisble
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 17 May 2005 15:06
Location: England
Contact:

Post by Invisble »

that you would. Got to love the "build while paused" mode. :D
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

gkirilov: in that case you probably know, that your routes will be broken so you don't want to receive such messages. This is why there is an option in patch settings, where you can swich them off.

Any suggestion how to make it better?
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

Yup, make it the way it was. :D ( I am actually NOT joking) or you could make both ways possible.
The old way will give a message if the train travels too long i.e. it takes a much longer route(for whatever reason). Imagine going though the whole network, because of one junction not being build, in order to reach the destination.
Your modification will not give an error message because there is actuilly a route to the destination (and this will result in lower income).

p.s. i don't like the idea changing the patch options every time i decide to cut a line.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

Hmm. Maybe the original assumption, that 'if train can't find its way, then it is lost' was wrong.

So please correct me:
1) The current message "Train #1 is lost" that informs you now about the situation, when train can't find its route, which I (and not only I) think is the same, is totally wrong.

2) The previous message "Train #1 is lost" which occurs months or years after the last order was fulfilled and train is traveling with coal via long route, but it is not actually lost, was quite OK, because you understand it properly as the warning that "Train route is relatively long, you can add some waypoints if you don't want to see many of such messages again and again.". And because you want to be informed about such event, you are missing the old "Train is lost" message, and want to revert the change back.

3) If train really gets lost and it randomly travels from one station to another, you don't want to see immediately that it is lost, but rather you would like to see such message after months or years, when many other trains are also lost and causing terrible traffic jam, blocking other trains and so on.


So by other words:
1) If train is really lost, you don't care. Or rather you want to be informed after months when the damage (caused by one signal, that was accidentally placed in the wrong direction) is so big, that you have already lost lot of money and valuable ratings.
2) On the other side, if train has long route on its schedule, you want to see the message "Train is lost" continuously.

Hey, are we both talking about the same game, or am I completely lost now? To me you seem to be a self-destructive masochist. Or am i wrong?

When i asked you for suggestions, i meant something more productive like to warn user only once and then offer some list of lost trains instead of reporting it for each train separately.

I would like to hear from others what they think, as i am not going to revert obviously good feature because of one user that is not satisfied with its current implementation. Yes it can be annoying in the situation you described. I agree. But still there should be some less destructive way how to make it better, than to stop/revert the evolution.
User avatar
Invisble
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 17 May 2005 15:06
Location: England
Contact:

Post by Invisble »

How about modifying the "train is lost" box depending on what has happened to something like as follows.

1. if a route is broken, a message pops up and says "missing track, unable to find path to next destination"

2. If a train gets confused as to it's path and is somewhere where it should not be, a message pops up saying "the train is lost"

3. If the train is on a long piece of track and neither condition applies, no warning message pops up.
http://www.tearsofangels.co.uk A place to share and discuss works of art in a Christian inspired atmosphere.
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

KUDr wrote:Hmm. Maybe the original assumption, that 'if train can't find its way, then it is lost' was wrong.

So please correct me:
1) The current message "Train #1 is lost" that informs you now about the situation, when train can't find its route, which I (and not only I) think is the same, is totally wrong.

2) The previous message "Train #1 is lost" which occurs months or years after the last order was fulfilled and train is traveling with coal via long route, but it is not actually lost, was quite OK, because you understand it properly as the warning that "Train route is relatively long, you can add some waypoints if you don't want to see many of such messages again and again.". And because you want to be informed about such event, you are missing the old "Train is lost" message, and want to revert the change back.

3) If train really gets lost and it randomly travels from one station to another, you don't want to see immediately that it is lost, but rather you would like to see such message after months or years, when many other trains are also lost and causing terrible traffic jam, blocking other trains and so on.


So by other words:
1) If train is really lost, you don't care. Or rather you want to be informed after months when the damage (caused by one signal, that was accidentally placed in the wrong direction) is so big, that you have already lost lot of money and valuable ratings.
2) On the other side, if train has long route on its schedule, you want to see the message "Train is lost" continuously.

Hey, are we both talking about the same game, or am I completely lost now? To me you seem to be a self-destructive masochist. Or am i wrong?

When i asked you for suggestions, i meant something more productive like to warn user only once and then offer some list of lost trains instead of reporting it for each train separately.

I would like to hear from others what they think, as i am not going to revert obviously good feature because of one user that is not satisfied with its current implementation. Yes it can be annoying in the situation you described. I agree. But still there should be some less destructive way how to make it better, than to stop/revert the evolution.
I don't mean in any way for you to remove the feture that is useful.
1. The assumption you made is not totally wrong. And generating only one message is good enough for me.

2. As I said I don't want you to revert the change, I just think that having both is a good idea.
You are also missing the part where you can change the days a train can travel whithout getting lost. I do this(or I used to do this) according to size of the map so when I see the message for a lost train I first check if the train is lost and if not, I increase this value with 10/20 days.
And the big disadvantage of your patch is that it does not report this case.

3. This is the same as the 1st case - there is no available route to the destination. And yes, I would like to see that immediately(but only once) ;).

I don't how you come up with the masochist thingy :D.
But anyway I hope more people discuss this so every one is happy at the end.
Edit: Invisble's points are good.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

Invisble:
1. if a route is broken, a message pops up and says "missing track, unable to find path to next destination"
Well, english is not my mother-language and i rely on others (native english speakers that told me, that the original message "Train is lost" is correct ("Same string. The message is absolutely correct in this case")

2. If a train gets confused as to it's path and is somewhere where it should not be, a message pops up saying "the train is lost"
How would you tell that train is "somewhere where it should not be"? This is nonsense. No way. Sorry.

3. If the train is on a long piece of track and neither condition applies, no warning message pops up.
OK, this is current behavior.


As you can see:
1. different message - you must point to somebody else who can judge. I am only developer. And I was told the message is absolutely correct.

2. kidding about some super smart and sophisticated way to tell train is not on his route..... Sorry, can't take it seriously.

3. already done.

Any other outstanding task(s)?
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

gkirilov: ok, if you agree with Invisible, then we are done with that discussion.

And one other point again:
- If train driver knows the way, even the way is not the optimal one (due to track reconstruction) then the train IS NOT lost.
- If driver doesn't know the way then the train IS lost. And it is lost IMMEDIATELY. Not after (variable) number of days.
If you tell otherwise, then YOU are totaly wrong.

As you can see, the current behavior is the only one correct and totally logical. Well, lets talk about other aspects, i.e. playability (how to improve it), as the previous point is clear now (hopefully).
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

Let me add to this discussion an important property of both YAPF and NPF pathfinders: both of these are complete.

This means that given any network they either find a route or they do not. And they do this at the start before a train even starts to move. So if they do not find a route, then the train is lost, and it is lost immediately.

The original pathfinder was not complete. It generally took a direction somewhere towards its target and then hoped to get there. That is why the original 'train is lost' message was only shown after months/years, because that is when you knew something was wrong. With the new pathfinders you know this immediately once something goes wrong.

The only question is of course if you should be informed immediately; something like changing a signal and getting a zillion lost-messages right away would be sub-optimal.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

KUDr wrote:gkirilov: ok, if you agree with Invisible, then we are done with that discussion.

And one other point again:
- If train driver knows the way, even the way is not the optimal one (due to track reconstruction) then the train IS NOT lost.
- If driver doesn't know the way then the train IS lost. And it is lost IMMEDIATELY. Not after (variable) number of days.
If you tell otherwise, then YOU are totaly wrong.

As you can see, the current behavior is the only one correct and totally logical. Well, lets talk about other aspects, i.e. playability (how to improve it), as the previous point is clear now (hopefully).
I wrote my suggestion in the previous post (which differ from Invisble's one). Shortly: 1. display only one message if multiple trains get lost "at the same time". 2. Display a message "Train did not make any progress in XXX days"(whatever message you want) if the train does not reach the destination within XXX days(the old version of the "lost" feature, may be you can improve it somehow. Call it whatever you want).

p.s. Offtopic: If you want to be technical - to be lost is when you don't know where are you (and it has nothing to do with finding the destination). If the line is cut the train can not find the way, but it does not mean it is lost. But this is not important at all.
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Post by KUDr »

Yes. I am still waiting for some other suggestions before i decide for one of them. Up to now we have:
a) let the message show only for fhe first such train and then somehow suppress subsequent messages temporarily. In this case I would prefer to somehow give the user a chance to review all lost trains. Still not sure how to do that.
b) show the message bit latter for whole chunk of trains. Don't know exactly how to handle that. But we can think of it.
c) would like to here from others


To your second warning message: I don't think that one general "timeout" for making progress would be any usefull. I can much better imagine some configurable (or automatically calculated) timeout for the progress as the property of each particular order on the train order list. But then again, it will be triggered also in the situation you described, when train can't follow its usual way as this is blocked temporarily by local rail reconstruction and must go the other way that is much longer. Then you will also see 200 annoying messages about the same issue.

The original warning implementation was really annoying. After one year it warned me that the train is lost, while it only had long route. On the other side it didn't tell me for whole the year that another train, short routed one is lost, while it was really lost. Why would you like that? I am still missing the point (this was my understanding of you being masochist).

PS: and please, don't explain me what it does mean to be lost. I feel lost when i can't follow my usual way (broken car, road reconstruction, high water, etc.). I also feel lost when my Internet connection is broken (so i can't use even phone).
I just rely on the info from native english speakers.
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Perhaps a list of lost trains? Much like the lists of trains sharing orders, or scheduled to use a station. The list shows all moving trains without complete paths. The player can see at a glance how many trains are lost, and can watch the list populate or depopulate as they change track or signals and routes are recalculated. It couls be sortable by number of days lost (if that is stored), meaning that a train which is truly stuck on piece of track that it can't escape from without intervention will float to the top of the list, above any temporarily lost trains.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
User avatar
RiTi
Transport Coordinator
Transport Coordinator
Posts: 374
Joined: 23 Jun 2006 10:24

Re: YAPF - Testers needed!

Post by RiTi »

KUDr wrote:Guys, I would like to ask all of you to help me to test new pathfinder prototype (svn://svn.openttd.com/branch/yapf). Once it will be debugged, I can move forward to the next dev phase with it - I would like to add the segment cost caching to improve the YAPF performance. Now YAPF for trains spends like 90% of time in the segment cost calculation so the caching its results could help a bit.
I took a part of your first message to ask you if there is still testing to be done as you asked in this message. This topic has "grown" with a lot of new abilities/extra's/new possibilities and I don't know what is still needed. So could you give an update of what has to be tested?
Keep life simple...
KUDr
OpenTTD Developer
OpenTTD Developer
Posts: 219
Joined: 11 Jan 2006 21:36
Location: Czech Republic

Re: YAPF - Testers needed!

Post by KUDr »

RiTi wrote:...So could you give an update of what has to be tested?
Thanks for this question. The basic functionality tests are done i guess. I appreciate lot of user feedbacks here, on IRC and also in FlySpray. Several bugs were fixed and we can now tell that YAPF works (for trains and road vehs). But it doesn't mean that further testing would be pointless.

Now it is waiting for its first official release. So for now i would suggest to just sit and play openttd with YAPF enabled for trains and road vehicles and watch your vehicles if they do what you would expect. If they will take another route to their destination than you would expect it can be either bug, or side effect of any advanced feature like load balancing or it can be that your network design would require different YAPF settings.

Advanced users can try to customize those settings. You can see them in your config file under section [YAPF] so you can easily customize penalties for each kind of obstacles (curve, slope, crossing, etc.) and try to find values more appropriate for your case. Just be avare that if you change those values, they will become into effect when you start new game, not when load existing savegame. If you will think that some setting should have different value in most of cases (not specific one), then we can talk about it. You can also compare behavior of different pathfinders in such cases and give me a feedback.
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

You can change the values for your running game from the console. For example: "patch yapf.road_crossing_penalty 900"

"patch yapf.road_crossing_penalty" << retrieve value
"patch yapf.road_crossing_penalty 900" << set value
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
RiTi
Transport Coordinator
Transport Coordinator
Posts: 374
Joined: 23 Jun 2006 10:24

Post by RiTi »

At the screenshot you see a train taking the right corner (TC003-10) while it automaticly should choose for the left corner (TC003-9) of the square (left corner has no delay in time of up hill). The square is on all sides equal. With way-points I force the train to take the left corner but I would like to know why it takes the right one.
Attachments
Transport, 24 Feb 2046.png
(117.24 KiB) Downloaded 154 times
Keep life simple...
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests