IRC logs for #openttd on OFTC at 2017-04-03
⏴ go to previous day
00:26:49 <peter1138> erm, if i run a savegame multiple times without touching it, will the random stuff do exactly the same each time? i assume it will.
00:28:40 <peter1138> of course it should, else multiplayer would never work
00:30:45 <Samu> yes, for the same builds
00:34:16 <Wolf01> Samu, patch the game so for every new game it loads your colors and face instead of random
00:49:50 <Wolf01> Oh, the caboose problem seem fixed, my friend was pissed off to not be able to run steam trains without cabeese XD
00:52:59 <peter1138> wonder what the problem was
00:53:24 <peter1138> nothing changed like that since i ... came back
00:53:28 <Wolf01> He is still able to select € in 1850
00:54:11 <peter1138> i still can't in 2017 ;(
00:54:37 <Eddi|zuHause> you won't for quite a long time i'm afraid
00:55:29 <Wolf01> TBH, he has a strange computer, this evening chivalry didn't display class selection or team selection for him...
00:56:34 <Eddi|zuHause> and my sleeping pattern doesn't align with my working pattern
00:57:52 <Eddi|zuHause> which can't be good for my health
00:58:07 <Wolf01> my sleeping pattern doesn't align with real life
01:06:23 <ST2> Samu: our patches don't work with 1.7.0 for not allowing rails crossings and neither the Water bourne industris ^^
01:07:40 <Samu> that means no btpro for 1.7.0? :(
01:08:27 <ST2> you should really try more online games ^^
01:08:52 <ST2> all BTPro's are with 1.7.0
01:08:55 <Samu> nevermind, they're all listed now
01:09:09 <Samu> they weren't for 2 days, I thought they'd never come
01:09:31 <ST2> we only have a couple admins with server access
01:10:10 <ST2> I was with my nephews and no internet, the other wasn't even on his country xD
01:10:28 <ST2> that's why only updated tonight :)
01:16:23 *** OsteHovel has joined #openttd
01:16:50 <Samu> Original: 1h20m54s with patch (~1.15% slower) Original: 1h19m59s without NPF: 40m34s with patch (~7.94% slower) NPF: 37m35s without Yapf: 28m21s with patch (~1,13% slower) Yapf: 28m02s without
01:17:26 <Samu> NPF did bad, why? I don't get it
01:17:42 <Samu> peter1138: any logic explanation :(
01:23:03 <Samu> st2, do u got a non-grf server with ships? must get some savegames from them
01:23:53 <ST2> [00:23:42] <~ST2> 17limits
01:23:53 <ST2> [00:23:42] <+ttd-srv17> Current vehicle limits: Trains: 1000, Road vehicles: 1000, Ships: 40, Aircraft: 35 | Station spread: 25 tile(s), Train length: 25 tile(s)
01:58:37 *** orudge` has joined #openttd
01:58:37 *** ChanServ sets mode: +o orudge`
02:00:21 *** chomwitt has joined #openttd
06:32:09 *** sla_ro|master has joined #openttd
06:49:22 *** orudge` has joined #openttd
06:49:23 *** ChanServ sets mode: +o orudge`
06:56:20 *** Hiddenfunstuff has joined #openttd
08:38:35 *** andythenorth has joined #openttd
08:42:36 *** Montana has joined #openttd
08:53:02 *** andythenorth has left #openttd
09:03:11 <peter1138> max_penalty means max_penalty_unless_destination_found
09:36:24 *** andythenorth has joined #openttd
10:11:50 <peter1138> so if i enforce the max_penalty, then... loads of trains never get serviced :p
10:35:23 *** Hiddenfunstuff has quit IRC
10:41:56 <Samu> hi peter1138 , i didn't change yaps rail depots
10:42:03 <Samu> are you testing my patch or?
10:42:16 *** Speedy` has joined #openttd
10:42:34 *** Speedy` is now known as Speedy
10:52:22 *** Arveen2 has joined #openttd
10:52:24 *** Flygon__ has joined #openttd
10:52:37 *** Lejving_ has joined #openttd
11:11:13 <peter1138> no i'm testing trunk
11:11:33 <V453000> sooooooooooooooo how do I use grfstrip? :D
11:11:53 <V453000> apparently some guy with E3-1230v6 and an i7 7700K has problems with extra zoom
11:12:00 <V453000> not even mentioning problems with 32bpp
11:12:32 <V453000> how do I strip the grf by grfstrip?
11:12:53 <peter1138> i guess... run it and check the parameters needed? i dunno, i've never seen it.
11:13:35 <V453000> yeah "run it" is what I need info about :D
11:15:10 <peter1138> i imagine it has parameters
11:15:45 <planetmaker> V453000, instead of castrating your grf you might want to tell the guy to tune his settings ;)
11:17:46 <V453000> he has sprite_cache_size_px = 512 and is trying to run the game with both 8bpp optimized and 32bpp optimized blitters
11:18:04 <V453000> says making window smaller helps
11:18:11 <V453000> so 4K is clearly not helping, but yeah
11:26:31 <dihedral> tell him to buy a different screen
11:27:07 <planetmaker> 256 colour VGA screen ;)
11:27:22 <Samu> something interesting just happened, NPF vs Yapf
11:27:36 <Samu> NPF trains did actually find a way, while Yapf didn't
11:28:38 <Samu> i suppose that on very heavy networks, NPF will do better
11:29:02 <Samu> it's a worst case scenario testings
11:30:35 <Samu> either that, or NPF was lucky, must investigate this better
11:33:38 <Samu> some weird thing is happening on NPF, the train is not getting serviced
11:34:55 <Samu> when the train needs to service, but has a PBS track to follow, the train won't find a way to a depot, it's forced to follow
11:37:02 <Samu> looks like once the tracks are reserved, they can't be updated if the vehicle suddenly needs to service, using NPF, not sure about how Yapf handles this
11:38:20 <Samu> also not being updated if the train needs to go to any other destination, not just depots, just tested skipping orders
11:40:34 <Samu> gonna check yapf, on a more manageable situation
11:40:45 <Samu> not on a worst case scenario
11:42:32 *** andythenorth has joined #openttd
11:43:48 *** andythenorth has left #openttd
11:44:14 <Samu> once the path is reserved, the train is forced to follow it, no matter what? is that how it's supposed to work?
11:46:51 <Samu> yapf handles this better
11:50:07 <Samu> you're right peter1138 "Fixing this affects train depot finding adversely (as it relies on this bug). "
11:50:49 <Samu> or actually, not really, i'm confused with max_search_nodes
11:51:22 <Samu> one thing is max_search_nodes, other thing is max cost of a path
11:53:22 <Samu> had you limited the max_search_nodes, then yes, it would affect train depot finding adversely, but that's not what max_penalty does
11:54:30 <Samu> max_search_nodes is still the same, wether it's searching for a depot or searching for a route
11:56:23 <Samu> the bug I found, happens on a worst case scenario, will 64x64 rail tiles in every direction, max_search_nodes is quickly reached and Yapf doesn't find a good path, be it depot or station
11:58:45 <Samu> with NPF, it did find a way, i dunno if it was by luck (found it before reaching the max_search_nodes limitation) or if it's really not bugged
12:02:39 <Samu> just limited it to 500, still found a way, very odd
12:03:07 <Samu> NPF is either extremely lucky, or ... i dunno, must investigate this better
12:34:12 *** JacobD88 has joined #openttd
13:01:25 *** Adrian[m] has joined #openttd
13:08:58 *** chomwitt has joined #openttd
13:58:45 *** andythenorth has joined #openttd
14:30:56 *** JacobD88 has joined #openttd
15:05:07 <peter1138> Samu, reaching max_search_nodes and therefore not finding a path isn't "bugging out"
15:06:31 <peter1138> i'm not trying anything
15:06:51 <peter1138> i'm responding to your comment that "the bug i found" ... "it bugs out"
15:08:54 <Samu> i tried to follow NPF counting and how it builds a path
15:10:03 <Samu> there are 2 things happening that I think are bugs, 1 for yapf, 1 for npf
15:10:38 <Samu> with yapf, the "bug" is solveable by increasing the max_search_nodes
15:12:02 <Samu> with npf, a train that needs to service won't be able to pick a new route because it has been previously reserved for the last order
15:12:32 <Samu> once the path is reserved, there's no other choice but to follow it 'till the end
15:13:01 <Samu> the bug happens when CheckIfTrainNeedsService is called
15:13:23 <Samu> the path is already reserved, and it can't compute a new path to a depot
15:13:33 <peter1138> as i said. reaching max_search_nodes is NOT a bug
15:14:29 <peter1138> and i don't think anyone really cares about npf
15:14:31 <Samu> what is yapf search based on?
15:15:20 <Samu> really? then I really don't understand the different behaviour
15:16:50 <peter1138> i guess opf was dijkstra but then someone changed it to a* as well
15:16:56 *** TheMask96 has joined #openttd
15:17:16 <peter1138> or was that ntp. can't remember now
15:20:47 <Samu> i sent you a pm on the forum with savegame
15:21:07 <Samu> that save shows yapf failing
15:21:21 <Samu> if you change the pathfinder to npf, you'll see it not failing
15:21:36 <peter1138> with the grid of 64x64 tiles?
15:21:46 <peter1138> then i'm not interested
15:22:06 <Samu> it's weird then that it doesn't fail on npf
15:22:30 <Samu> i wanted to understand why it fails in one but not the other if they're both a*
15:22:47 <peter1138> they have limits implemented differently
15:22:59 <peter1138> and a different set of penalties
15:24:07 <Samu> i set max_search_nodes to 500 and it still doesn't fail, which is... odd
15:24:35 <Samu> it would require about 43000 for yapf, and 500 is still sufficient for npf? doesn't sound right
15:28:26 <Samu> weird, the code still mentions 10000, i thought it had changed, something's wrong
15:32:53 <peter1138> heh, that js shows how bad dijkstra is
15:33:58 <Samu> max_search_nodes 10000 unsigned int
15:34:45 <Samu> it initializes as 10000 for some reason
15:35:33 <Samu> gonna force a 500 in the code
15:39:26 <Samu> alright, you're right after all
15:39:59 <Samu> it not really "bugs out" with npf with 500
15:40:59 <Samu> i had to force 500 via code though, it wasn't reading the value i've set via console, even though it was already 500
15:42:43 *** JacobD88 has joined #openttd
15:47:00 <Samu> npf is only initialized once?
15:50:08 <Samu> { bla; bla; _npf_aystar.max_search_nodes = _settings_game.pf.npf.npf_max_search_nodes; }
15:50:50 <Samu> i loaded a savegame with 500 in it, but it was still 10000 when pathfinding
15:57:21 <Samu> now it's working, really... I'm sorry
15:58:22 <Samu> set pf.npf.npf_max_searchnodes = 500 in the console does not change it
15:58:31 <Samu> set pf.npf.npf_max_searchnodes 500 in the console does
16:16:23 *** orudge` has joined #openttd
16:16:23 *** ChanServ sets mode: +o orudge`
16:24:45 *** Alberth has joined #openttd
16:24:45 *** ChanServ sets mode: +o Alberth
16:43:52 *** Wormnest has joined #openttd
16:48:02 <Samu> FS#6552 - i wonder if slope costs can affect max_penalty
16:55:50 <Alberth> ok, what are slope costs then?
16:57:12 <Alberth> in general, I think the answer is yes, you can have any form of costs. The kind of path that you look for decides what is useful to see as cost
17:05:38 <Samu> hmm ships are complicated, can't compute water in segments
17:06:27 <Samu> so this is how you save performance on yapf, you segmentate paths
17:10:39 <Samu> it follows the entire segment until it finds a junction
17:11:43 <Samu> the segment can be 50 tiles in a row
17:11:49 <Wolf01> Interesting, I've always wondered why a train didn't consider to take a shortcut on fields instead of following the track
17:12:25 <Alberth> with not-fluid-types, it could take shortcuts across water
17:13:19 <Samu> ships are complicated, every tile splits the path
17:15:11 *** Belugas has joined #openttd
17:15:11 *** ChanServ sets mode: +o Belugas
17:17:28 <Samu> peter1138: i don't understand your bug report,
17:17:36 <Samu> it's implemented for trains
17:19:09 <Samu> sorry, i'm semi dumb today, bear with me
17:20:11 <Wolf01> I'm numb instead, too much boredom
17:20:14 <Samu> the penalty for depot searching is only applied when it's trying to locate the closest depot during automatic service
17:20:39 <Samu> if it's ordered to go to a nearest depot, there is no penalty, it's unlimited
17:20:56 <Samu> well i dont understand what you're reporting then :(
17:21:07 <peter1138> "Yapf will return paths whose penalty is greater than max_penalty in some cases"
17:22:09 <peter1138> i'm not normally accused of that :)
17:22:41 <Samu> yapf computes a cost of 2000, then it halves /2, becomes 1000 when going back to checkiftrainneedsservice
17:23:42 <peter1138> "Yapf will return paths whose penalty is greater than max_penalty in some cases" < that is it
17:24:40 <Samu> i don't get it, give me an example
17:24:48 <Wolf01> "If fruit.size <= banana.size then return fruit", in your case it's returning watermelon
17:25:31 <peter1138> set max_penalty to ... 2000 (because you like that value i guess)... and it will sometimes return a path that has a penalty ... guess what...
17:26:03 <Samu> are you sure it does that?
17:27:18 <Samu> I'm staring at yapf_costrail.hpp now, must see where that happens
17:28:45 <peter1138> yes that sets the flag
17:30:19 <Samu> ah, the flag isn't being handled
17:30:30 <Samu> is that it? so it never stops searching
17:30:31 <peter1138> not quite that simple!
17:31:59 <Wolf01> peter1138, speaking about more important things, it seem that the music volume was fixed too O_o
17:32:27 <peter1138> it was never touched
17:32:43 <Wolf01> Then 1.6.1 was haunted
17:33:44 <Samu> what would happen if you put a break; on there? or a return false?
17:34:55 <peter1138> certainly, it's easy to fix that
17:35:01 <peter1138> but it "breaks" other things that rely in it
17:35:34 <Samu> only for automatic servicing
17:35:40 <Samu> which is fine, isn't it? :(
17:37:49 <Samu> CheckIfTrainNeedsService is the only one that sets a max_penalty different than 0
17:40:09 <Samu> :( there are many ways to find a depot, it's in the orders, you tell the train to go to depot, or the interval servicing
17:40:37 <Samu> go to nearest depot = penalty is 0
17:40:47 <Samu> you tell train to go to depot = penalty is 0
17:41:12 <Samu> interval servicing = penalty is whatever it is on the config file, 2000 for default
17:53:05 <Samu> I see this on juanjo patch + return FindDepotData(n->GetLastTile(), n->m_cost, pNode->m_cost != 0);
17:53:35 <Samu> n->m_cost should be n->m_cost / 2 if it is to be equal to the original code
17:56:54 <peter1138> it should be penalty / 2 if it is to be equal
17:57:39 <peter1138> max_penalty / 2 sorry
17:58:10 <peter1138> but if the patch keeps the fake value
17:58:15 <peter1138> then there is no reason for it
17:58:39 <Samu> n->m_cost is to be compared against the max_penalty
17:59:48 <Samu> max_penalty is a bad name, it's in fact, a cost
18:01:25 <Samu> Yapf().SetMaxCost(max_penalty);
18:02:57 <Alberth> variable names are one of the hardest things in programming
18:04:01 <Samu> max_penalty_distance_cost
18:05:46 <Samu> line 3967 train_cmd.cpp if (tfdd.best_length == UINT_MAX || tfdd.best_length > max_penalty) {
18:06:08 <Samu> this max_penalty is the max_cost of the pathfinder halved /2
18:08:30 <Samu> sends the penalty as 2000, yapf computes it, and anything up to 4000 will still fail the check 4000 / 2 > 2000
18:25:59 <Samu> just checked about line 575
18:26:19 <Samu> it's working, the flag is dealt with there, i'm getting a return false
18:27:04 <Samu> cost was over 2000, and it stopped searching
18:31:13 <Samu> over 2000, the pf doesn't find
18:31:41 <Samu> 1000 > 2000 is always false
18:32:04 <Samu> the cost is UINT_MAX in that case
18:32:14 <Samu> if it goes over 2000 in the pf
18:32:41 <Samu> so, in essence, juanjo is right
18:33:35 <Samu> n.m->cost / 2 or n.m->cost would make no difference
18:35:46 <peter1138> you're still wrong, though
18:37:32 <peter1138> because it doesn't return n.m->cost / 2
18:37:48 <peter1138> it returns max_penalty / 2
18:41:51 *** andythenorth has joined #openttd
18:42:10 <andythenorth> Alberth: IH makefile mostly transplanted to FIRS in copy-paste
18:42:42 <Samu> n.m_cost = parent_cost + segment_entry_cost + segment_cost + extra_cost;
18:43:03 <Samu> if (m_max_cost > 0 && (parent_cost + segment_entry_cost + segment_cost) > m_max_cost)
18:43:22 <Samu> okay, so it's not counting with the extra_cost
18:46:31 <Samu> so this is the bug you're referring to
18:47:27 <Samu> extra_cost not being accounted for
18:48:30 <andythenorth> ach I made FIRS slower again
18:49:14 <andythenorth> all these checks for incompatible industry, lot of advanced varact2
18:49:15 <andythenorth> can’t OpenTTD check that crap for me? :|
18:52:02 <peter1138> what's an incompatible industry?
18:53:15 <andythenorth> I give an ID, and min. distance
18:53:29 <andythenorth> there’s a shit version built-in as a static property
18:53:35 <andythenorth> limited to 3 industries
18:53:53 <andythenorth> stops iron ore mine building right next to steel mill (for example)
18:57:04 <peter1138> so 2000 is... short
18:58:36 <Samu> 2000 is about 20 tiles without slopes and other funny stuff like cuves, train speed and so
18:59:42 <Samu> oh wait, extra_cost isn't being accounted, ignore train speed
18:59:50 <Alberth> andythenorth: nice :)
19:00:33 *** WegeClausen has joined #openttd
19:00:58 <WegeClausen> Hi Question is there a feather list where i can see the town needs
19:01:29 <WegeClausen> at selection gifts
19:02:04 <Samu> lol, the rail crossing penalty is aplied on trains instead of road vehicles...
19:02:10 <WegeClausen> so select food gives the list of townes that take food
19:03:41 <peter1138> so i'm seeing a penalty of 5300
19:03:46 <peter1138> on the tile just outside a depot
19:04:24 <Alberth> "town" doesn't need food, it's "enough houses" near each other
19:05:21 <peter1138> pf.yapf.rail_depot_reverse_penalty is applied
19:05:26 <peter1138> even though it's not reversing
19:05:34 <peter1138> so there'a 5000 penalty just for going into a depot
19:05:38 <peter1138> no wonder 2000 doesn't work
19:06:03 <Alberth> start digging and find more bugs? :)
19:06:31 <peter1138> it is applying that penalty even though the depot is the target :)
19:07:05 <Samu> if that is true, how do trains still service?
19:07:31 <peter1138> Samu, as i said, it's due to this bug where max_penalty/2 is always used
19:10:27 <peter1138> max_penalty/2 is always < max_penalty
19:11:35 *** WegeClausen has left #openttd
19:12:09 <Samu> tfdd.best_length > max_penalty
19:12:27 <peter1138> Samu, best_length is max_penalty / 2 at that point
19:13:20 <peter1138> well, i guess the simple solution is to just include the reverse cost into the max_penalty
19:14:09 <Samu> case VPF_YAPF: max_penalty = _settings_game.pf.yapf.maximum_go_to_depot_penalty + something?
19:17:21 <peter1138> in fact i think it's probably the best way
19:17:45 <peter1138> else i fear that caching will get broken
19:18:21 <peter1138> 238 if (max_penalty != 0) pf1.DisableCache(true);
19:18:27 <peter1138> already disabled ahhg
19:18:57 *** orudge` has joined #openttd
19:18:57 *** ChanServ sets mode: +o orudge`
19:22:42 <Samu> rail_depot_reverse_penalty = 5000
19:23:48 <Samu> if (m_max_cost != 0) segment_cost += Yapf().PfGetSettings().rail_depot_reverse_penalty;
19:27:33 *** Maraxus has joined #openttd
19:31:52 *** FLHerne has joined #openttd
19:32:34 <Samu> inline bool PfDetectDestination(TileIndex tile, Trackdir td)
19:35:15 <Samu> how am i getting a Trackdir now lol
19:37:01 <Samu> if (!Yapf().PfDetectDestination(cur.tile, cur.td)) segment_cost += Yapf().PfGetSettings().rail_depot_reverse_penalty;
19:41:46 <peter1138> alternatively just flag a depot as a depot when you reach the depot
19:41:51 <peter1138> instead of turning around
19:42:06 <peter1138> but i have not determined what other impact that would have yet
19:43:34 <Wolf01> What if you have to turn around at a depot to reach the nearest depot?
19:44:15 <peter1138> Wolf01, where did we get this guy from
19:45:44 <DorpsGek> Commit by translators :: r27842 trunk/src/lang/spanish.txt (2017-04-03 19:45:36 +0200 )
19:45:46 <DorpsGek> spanish: 9 changes by SilverSurferZzZ
19:45:56 <Wolf01> BTW, does it select the depot it wants to reach and then keeps it for the entire path or it's so smart to check for the nearest depot at every junction?
19:46:31 <peter1138> there's no memory as such
19:46:38 <peter1138> it just says "i need a depot pls"
19:46:46 <peter1138> and it's either too far, or there
19:56:19 <peter1138> hmm i guess i need to test this in MP with desync debugging on
20:00:33 *** Stimrol has joined #openttd
20:04:10 *** sla_ro|master has joined #openttd
20:04:19 <Samu> it works so far, i tried with an order to a depot, an order to search for closest depot, an order to a station
20:05:56 <Samu> when it's ordered to enter X depot, and it's not the one it's looking for, the cost is added
20:06:30 <Samu> you have a Set Destination in this case
20:07:15 *** HerzogDeXtEr has joined #openttd
20:07:50 <Samu> with an order to search for closest depot, it finds it and does not add 5000
20:08:17 *** frosch123 has joined #openttd
20:09:03 <Samu> with an order to a station, it adds 5000 if goes through some depot
20:09:17 <Samu> tileindex doesn't match with the destination
20:19:58 <Samu> just tested one more case
20:20:59 <Samu> if it's ordered to go to a depot, but it must pass through another depot, the cost is added when going through the first depot, and not added when it reaches destination depot
20:21:06 <Samu> it works, everything werks!!
20:22:53 <Samu> i actually see ppl build stuff like this
20:23:21 <Samu> they remove the parallel track in front of depot, forcing train to enter the depot
20:25:53 *** Progman has joined #openttd
20:40:33 *** tokai|noir has joined #openttd
20:40:33 *** ChanServ sets mode: +v tokai|noir
21:04:54 *** Arveen2 is now known as Arveen453000
21:18:55 <peter1138> damn this bread roll is a bit stale
21:26:26 <peter1138> I might just commit this and hope it's correct ;)
21:27:49 <peter1138> Everything is getting serviced
21:27:59 <peter1138> Possibly even better than before.
21:29:03 *** orudge` has joined #openttd
21:29:03 *** ChanServ sets mode: +o orudge`
21:29:15 <peter1138> orudge why is your connection so shit these days :S
21:29:23 <peter1138> and also why are you never here :S
22:01:03 <peter1138> aqueduct pillars are silly
22:05:05 <Wolf01> Bridge pillars are silly
22:05:23 <Wolf01> I want true suspension bridges
22:23:07 <frosch123> there used to be a setting to disable drawing of pillars
22:23:12 <frosch123> not sure whether we removed it
22:26:52 <frosch123> did someone just test their own autokill?
22:29:11 <frosch123> oh, wait, it's a troll
22:29:24 <frosch123> i did not ready it precisely
22:30:17 *** andythenorth has joined #openttd
22:30:36 *** mikegrb has joined #openttd
22:31:28 <peter1138> the spambot's back!
22:31:48 <frosch123> better do not mail support
22:32:57 <peter1138> Dare I commit potential pathfinder (yapf even) fixes... I mean, it "works" right?
22:33:43 <SpComb> the unit tests pass, so it must work
22:33:49 <peter1138> Although I discovered issues after looking at those.
22:34:14 <peter1138> (actually there seems to have been unit tests for yapf at some point
22:34:19 <frosch123> we have some automated tests
22:43:03 <peter1138> any for pathfinding? if so, where? Hhe
22:46:39 <frosch123> fs#5926 is a good one
22:49:25 <peter1138> that's not exactly a unit test...
22:49:32 <peter1138> and anyway they need grfs that aren't on bananas
22:49:49 <frosch123> wasn't it a coop game?
22:50:10 <peter1138> ottdc_grfpack\6_town_buildings or something
22:50:49 <Pet0r> hi - was hoping someone could help me understand why a certain signal layout doesn't work
22:51:41 *** gelignite has joined #openttd
22:51:47 <Pet0r> I have a split where one route is "direct" route to the station and another is a "queuing area" which goes to the same station but snakes a bit for trains to wait in, I have a path signal before the split, and exit signals after, this does split the trains to some extent, but even when the exit signal in the shorter area is green, trains don't always take it
22:51:54 <Pet0r> instead they will go into the longer area
22:52:18 <Pet0r> but it doesn't always happen, I am not sure what the criteria is for why they pick the route they do
22:52:37 <frosch123> path signals and exit signals do not belong together
22:52:45 <Pet0r> even with entry it's the same problem
22:52:58 <Pet0r> (entry placed where path is)
22:53:45 <frosch123> if you ar eusing path signals only, then enable the "show reserved paths" option in the settings
22:55:19 <Pet0r> I could use a single path, how does it do its decision making?
22:55:24 <Pet0r> is it up to the next block signal or what?
22:55:31 <Pet0r> or is it to the next instruction?
22:57:39 <Pet0r> I did enable show reserved paths and I can see it reserving the less efficient path but not why
22:59:08 <Pet0r> ok so maybe path + block might work, I will try
22:59:22 <peter1138> Just path, generally, works well.
22:59:48 <peter1138> Block is only needed if you doing strange things with entry/combo/exit signals.
23:01:33 <Pet0r> ok I am sure this looks horrible to you guys but here it is
23:01:40 <Pet0r> there's a one way back signal at the start beofre the split
23:01:52 <Pet0r> you can see there the train coming from the left has chosen and reserved the long route
23:01:55 <Pet0r> but I just don't understand why
23:03:02 <Pet0r> all trains are heading to that station on the right
23:03:52 <Pet0r> but sometimes they do pick that lower route, I don't understand it
23:05:17 <peter1138> jeez zbase is ... er... unpleasant.
23:08:25 *** Biolunar has joined #openttd
23:09:33 *** andythenorth has left #openttd
23:09:38 <Pet0r> the only thing I can think of is the train prefers the route it took last time or something? and only changes if forced to?
23:14:14 <Pet0r> oh really? it's just a PNG
23:14:28 <Wolf01> "There was an error. Please try again later. That’s all we know."
23:14:41 <peter1138> but the graphics are nasty
23:14:50 <peter1138> misaligned sprites :(
23:15:42 <Wolf01> Ok, so trains always go via "big snek"?
23:16:17 <Pet0r> not my naming, it's a multiplayer game :) but yes
23:16:35 <Pet0r> my confusion is that they go that way sometimes when there's absolutely nothing at the bottom
23:16:47 <Wolf01> What I've learnt so far is that if you have a split you shouldn't use PBS, it's really useless
23:17:22 <Pet0r> thing is it didn't work for entry/exit either I think, it had the same problem
23:17:38 <Wolf01> PBS is when you have multiple inputs and multiple outputs in the same block which need to work at the same time
23:17:47 <Pet0r> I'll put exit right after the split at the bottom, and an exit a bit further into snek
23:17:55 <Pet0r> and entry before split, and see what happens
23:19:24 <Wolf01> I bet the depot there causes confusion
23:20:03 <Wolf01> Put it where is the one way pbs signal
23:20:06 <Pet0r> why would they choose to go away from it though?
23:20:48 <Wolf01> Maybe a train needs to go to the depot then goes straight
23:21:12 <Pet0r> hmm what do you mean? the depot is in the short route
23:21:18 <Pet0r> so surely the preference would always make it go there
23:21:39 <Pet0r> here it is with entry and exit
23:21:49 <Pet0r> the train near the "ITS ALIVE" sign went top
23:21:56 <Pet0r> when the direct bottom route is free
23:21:59 <Pet0r> I will delete the depot though
23:23:12 <Wolf01> I don't remember if there is a penalty set for red signals after a green signal
23:23:49 <Pet0r> 2 trains in a row did it there
23:23:54 <Pet0r> the one coming in from the left also went top route
23:23:54 <Wolf01> It might cause the "big snek" route to be preferred as it have more green signals
23:24:45 <Pet0r> but still some go the bottom route anyway (even when nothing is in the top route)
23:25:05 <peter1138> Wolf01, path signals are totally the opposite of useless for splits.
23:25:17 *** nekomaster has joined #openttd
23:26:03 <Pet0r> taking the better route with nothing in the top one
23:26:14 <peter1138> ^ small difference, but certainly not useless
23:26:14 <Pet0r> it literally seems like they just flip a coin when they get to the entry signal
23:26:19 <Pet0r> rather than calculating the best route
23:26:46 <Pet0r> (and maybe that's true but it's not what I thought)
23:26:50 <peter1138> no, it's calculated the longer route as the best route
23:26:57 <peter1138> (it may be cheaper, penalty-wise)
23:27:00 *** nekomaster has left #openttd
23:27:08 <Pet0r> ok, let me remove all but 1 block signal from the longer route then
23:27:17 <Pet0r> so there will be just 1 exit signal and 1 block signal in each route
23:27:23 <Wolf01> peter1138, that's micromanaging milliseconds and pixels, you don't even notice if the next train can enter the block when the first one just left the main track or passed the block signal 5 pixel away
23:27:41 <peter1138> Wolf01, it's not micromanaging if, like me, you always use path signals everywhere
23:27:41 <Wolf01> Unless you don't play with logic trains
23:28:13 <Pet0r> same problem even with those changes
23:28:59 <Pet0r> oh wait, missed a block signal behind a tree, checking again
23:30:09 <Pet0r> that might have actually been it
23:30:11 <Pet0r> number of green signals
23:30:18 <Pet0r> still watching but none have taken the longer route
23:30:25 <Wolf01> If it was for me I would have used 6 parallel waiting tracks there with 2 entry points where I would have put the only 2 PBS :P
23:32:00 <peter1138> Yeah, by default there's a _negative_ penalty for some signals.
23:32:06 <peter1138> Which could certainly cause it.
23:32:30 <Pet0r> so trains seem to pretty consistently take the lower route when there's just a single block signal and the exit signal on each route
23:32:44 <Pet0r> it's still confusing though because some trains still took the lower route even with the previous setup
23:33:09 <peter1138> Well if the loop was full of trains when it had to chose, there'd be less green signals.
23:33:46 <Pet0r> when both routes were entirely free of trains up to the right side, it seemed it was a 50/50 chance which route they would take
23:33:59 <Pet0r> it wasn't a case of taking the shorter route when a train was in the longer one
23:35:01 <Wolf01> I bet if you put a block signal for each tile of the short router, all the trains would use only that one
23:35:14 <Pet0r> I kind of just did that, I put like 6 block signals on that
23:35:21 <Pet0r> and only 4 in total on the big snek route
23:35:26 <Pet0r> and now they are only using that bottom one
23:35:56 <Pet0r> so the "green signal weighting" makes sense to me - but what still doesn't fit with that is the fact that trains would seemingly randomly take the top or bottom route before
23:36:09 <Pet0r> if it was the same thing I'd expect them to be consistently taking the top route when it was empty
23:36:11 <Pet0r> but that was not the case
23:36:18 <Wolf01> You want to look at these penalties:
23:36:19 <Wolf01> yapf.rail_look_ahead_max_signals = 10
23:36:19 <Wolf01> yapf.rail_look_ahead_signal_p0 = 500
23:36:19 <Wolf01> yapf.rail_look_ahead_signal_p1 = -100
23:36:19 <Wolf01> yapf.rail_look_ahead_signal_p2 = 5
23:37:08 <DorpsGek> Commit by peter1138 :: r27843 trunk/src/pathfinder/yapf/yapf_costrail.hpp (2017-04-03 23:37:01 +0200 )
23:37:09 <DorpsGek> -Change: (Yapf) Consider depot as destination before reversing path and applying penalty.
23:37:15 <Pet0r> sorry what are p0/p1/p2?
23:38:11 <Pet0r> peter1138: did you just commit something based on this discussion? :P
23:40:24 <Pet0r> well thanks guys, at least that has shed *some* light on it even if I still don't fully understand it
23:40:42 <peter1138> i think some of these penalties were guessed at the time it was made
23:40:47 <peter1138> and sort of work right most of the time
23:40:51 <peter1138> but sometimes... do odd things
23:41:05 <Pet0r> I can understand that, they can't account for every eventuality with a system like that
23:41:17 <Pet0r> because there's always edge cases where it doesn't work
23:41:28 <peter1138> if even we changed them, they are stored in the savegame so it wouldn't affect anything old
23:42:49 <Samu> oh, there's nothing about ship depots
23:43:35 <Samu> what about the max_penalty / 2?
23:44:32 <peter1138> " I don't know why everyone prefers separate patches "
23:47:39 <peter1138> that's why 1 line commits instead of 1 commit with tons of unrelated changes
23:48:45 <Wolf01> BTW, p0/p1/p2 -> pen[i] = p0 + i * (p1 + i * p2); and I can't even find where pen is used...
23:49:11 <Samu> isn't that about signal costs?
23:49:26 <Wolf01> Oh it's a pointer to m_sig_look_ahead_costs
23:49:41 <peter1138> Yeah, it's a weird point construct
23:50:08 <peter1138> Samu, try reading more than just one or two lines at a time, it'll give you context.
23:51:17 <Samu> i'm unsure how am i gonna split my stuff
23:51:25 <Wolf01> Yapf code seem what I would write after a lesson on variables scope
23:52:05 <Samu> i made a bit of many things for opf that it's hard to separate
23:53:42 <Samu> it confuses me, my brains...
23:53:57 <DorpsGek> Commit by peter1138 :: r27844 /trunk/src/pathfinder/yapf (yapf_costrail.hpp yapf_type.hpp) (2017-04-03 23:53:51 +0200 )
23:53:58 <DorpsGek> -Change: (Yapf) Treat max cost exceeded separately from path too long condition, as destination should not be considered in the former case.
23:57:06 <Wolf01> Samu, why don't you just split changes for each pathfinder?
23:57:16 <Wolf01> One pathfinder, one patch
23:58:03 <Samu> but how would I link everything on ship_cmd.cpp?
23:58:23 <peter1138> what does that mean?
23:59:26 <Wolf01> Wow, yapf is really black magic
23:59:40 <Samu> + case VPF_OPF: return OPFShipFindNearestDepot(v, max_penalty); + case VPF_NPF: return NPFShipFindNearestDepot(v, max_penalty); + case VPF_YAPF: return YapfShipFindNearestDepot(v, max_penalty);
23:59:54 <Samu> this function wants all 3
continue to next day ⏵