IRC logs for #openttd on OFTC at 2024-09-30
            
01:35:44 *** Wormnest has quit IRC (Quit: Leaving)
02:12:22 *** gnu_jj has joined #openttd
02:15:54 *** gnu_jj_ has quit IRC (Ping timeout: 480 seconds)
02:23:32 *** D-HUND has joined #openttd
02:27:04 *** debdog has quit IRC (Ping timeout: 480 seconds)
04:01:15 *** D-HUND is now known as debdog
04:07:18 *** keikoz has joined #openttd
04:47:11 <DorpsGek> [OpenTTD/OpenTTD] eints-sync[bot] pushed 1 commits to master https://github.com/OpenTTD/OpenTTD/commit/7a0e50002b7388c5a4915fa763deb75856cba1f3
04:47:12 <DorpsGek> - Update: Translations from eints (by translators)
05:12:23 *** keikoz has quit IRC (Ping timeout: 480 seconds)
05:23:10 <_pruple> well
05:29:10 <DorpsGek> [OpenTTD/OpenTTD] Release workflow was not successful https://github.com/OpenTTD/OpenTTD/actions/runs/11099786608
05:31:44 <_pruple> typical.
06:58:55 *** nielsm has joined #openttd
07:16:02 <DorpsGek> [OpenTTD/survey-web] survey-summary[bot] pushed 1 commits to main https://github.com/OpenTTD/survey-web/commit/f47da06f22c161d2251f6fdeec7be58a65b1f3ab
07:16:03 <DorpsGek> - Add: summary for week 39 of 2024 (by OpenTTD Survey)
07:17:01 *** keikoz has joined #openttd
08:45:59 *** Flygon has joined #openttd
08:58:30 *** mindlesstux has joined #openttd
09:36:49 <peter1138> Hmm, so JGRPP changes AddStringForMapping but whatever reason.
09:37:38 <xarick> _glx_: this example is a little bit misleading
09:37:38 <xarick> https://docs.openttd.org/gs-api/classGSVehicleList
09:38:01 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290246264423714866/image.png?ex=66fbc2f9&is=66fa7179&hm=db04792a9b6d3f627a428d090aa49169ac94369b78a43fc8f3b00ae2c5d38db3&
09:41:07 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290247044006674484/image.png?ex=66fbc3b2&is=66fa7232&hm=9a7bd022736e10ea150dfbe7c85ded3b815e2d315b03b8dc123aa0397cd1e515&
09:41:07 <xarick> this works
09:41:41 <xarick> oh, and the other line after
09:41:42 <peter1138> "Works"
09:42:48 <peter1138> That's probably meant to be two examples.
09:43:07 <peter1138> There's no point in your first line without an argument.
09:43:27 <xarick> local vehs_in_depot = GSVehicleList(GSVehicle.IsInDepot);
09:43:27 <xarick> local IsType = function(vehicle_id, type)
09:43:27 <xarick> {
09:43:27 <xarick> return GSVehicle.GetVehicleType(vehicle_id) == type;
09:43:27 <xarick> } }
09:43:28 <xarick> local road_vehs = GSVehicleList(IsType, GSVehicle.VT_ROAD);
09:46:25 <peter1138> Ahh, to reduce size/overhead. <https://github.com/JGRennison/OpenTTD-patches/commit/1e0279e72e4ffe2ce7deaef51b7693a597513e7b>
09:51:01 <xarick> yeah, I noticed they're 2 examples
09:51:15 <xarick> the 2nd example is the one that's misleading
09:51:20 <xarick> my bad
10:12:45 <peter1138> Hmm.
10:25:02 <xarick> can you make savegaming use multiple threads for compressing?
10:25:45 <xarick> or is it too hard to do
10:32:33 <peter1138> 2.7ms to map 2,201 strings on load. So speed isn't the issue.
10:33:24 <_glx_> Savegame compression and writing is already in another thread
10:39:19 <peter1138> To use lzma's multithread code, you'd need to replace the call to lzma_easy_encoder() at the least I'd think.
11:11:30 <xarick> copilot is saying
11:11:33 <xarick> lzma_stream_encoder_mt
11:13:45 <xarick> https://sl.bing.net/kT17wUepEoC
11:14:30 <xarick> not sure how helpful that is
11:15:18 <xarick> then there's decoding... so... maybe it won't work
11:16:16 <xarick> meanwhile, my testings of yesterday night have resulted in no asserts!
11:16:53 <xarick> so far
11:17:26 <xarick> i have a new type of testing
11:17:53 <xarick> 70000 ships searching for nearest depot, but with a penalty
11:17:59 <xarick> via automatic service
11:18:45 <xarick> bam! asserted immediately
11:18:59 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290271672812961793/image.png?ex=66fbdaa2&is=66fa8922&hm=fefefd9b78c71fc4f75fef3b397ebbe0dcc30eb7e0352d8cc812ed4eeace31ed&
11:19:20 <xarick> probably hlpf penalty related
11:31:29 <xarick> https://www.youtube.com/watch?v=SYM-RJwSGQ8 this song has a touch of Moby to it
12:59:24 <xarick> im getting a very strange case of low level pf not finding a path
12:59:33 <xarick> that has previously found
12:59:39 <xarick> i mean... what?
13:00:48 <xarick> did i break binary heap?
13:10:18 <xarick> oh boy...
13:11:23 <xarick> service orders triggered a bug in my code... ๐Ÿ™‚
13:16:03 *** keikoz has quit IRC (Ping timeout: 480 seconds)
13:17:36 <xarick> nop, it's not the binary heap
13:19:07 <xarick> it's my assertive code that is lacking :p
13:24:37 *** mindlesstux has quit IRC (Read error: No route to host)
13:32:39 <xarick> how do I backup an order
13:33:30 <xarick> get current ships order, destination, type, etc..., test a pathfinder command which updates the orders, but then revert back
13:33:41 <xarick> to the original state
13:36:39 *** mindlesstux has joined #openttd
13:36:52 <xarick> maybe i can workaround this
13:39:37 *** keikoz has joined #openttd
13:44:09 *** mindlesstux has quit IRC (Read error: Connection reset by peer)
13:49:47 <xarick> I'm so slow... took 2h30m to solve this issue
13:51:47 *** mindlesstux has joined #openttd
13:56:30 *** mindlesstux is now known as Guest5004
13:56:30 *** Guest5004 has quit IRC (Read error: Connection reset by peer)
13:56:31 *** mindlesstux has joined #openttd
14:12:02 *** mindlesstux has quit IRC (Read error: No route to host)
14:41:08 *** HerzogDeXtEr has joined #openttd
14:43:40 <xarick> automatic servicing being a pita :=)
14:50:41 <kuhnovic> I was looking at it yesterday evening for a bit, and yes, it is indeed a pain
15:01:24 <_glx_> and it's not better for trains with path signals
15:13:32 <xarick> i suspect the trouble comes from when the path_cache is empty
15:13:52 <xarick> and chooseshiptrack at that point picks a random track...
15:14:26 <xarick> let me confirm
15:15:26 <xarick> it's so slow to debug 70000 ships
15:15:43 <kuhnovic> That's why I generally stick to one, maybe a handful
15:16:06 <kuhnovic> https://github.com/OpenTTD/OpenTTD/pull/12170 did you read this description? That describes the general problem
15:19:55 <xarick> > With my changes, the ship will never look for a new depot if it's already heading for a depot.
15:19:55 <xarick> I'm experimenting with sticking with the same path, by actually repeatedly returning the same path every day CheckIfShipNeedsService is called
15:21:50 <kuhnovic> There is a problem with that. The ship has the liberty to go outside of the regions returned by the HL PF. But if you then call the ship from such a region your path might change. In some cases you can end up going back-and-forth.
15:22:36 <xarick> my understanding is that the cost can only go lower if the path returned still overlaps the previous returns
15:23:17 <xarick> so, if it was less than 2000 the first time when the ship was still far away, the next times, would only get lower
15:23:27 <kuhnovic> The solution I'm playing with now is to just check if the depot is still reachable using the HL PF only. That is fairly simple actually. The hard part is determining when to give up, otherwise the ship might end up sailing across the entire map just because there still is a path.
15:24:18 <xarick> so no dummy order to cancel the go to depot should happen
15:25:09 <kuhnovic> xarick: Yes but there lies the problem: your path will not overlap if called at the "wrong time". And checkIfShipNeedsService is called at the wrong time, because the ship might be outside of the HL path.
15:25:35 <kuhnovic> xarick: It should if the depot is unreachable or too far away
15:28:44 <kuhnovic> The regular ship pathfinding mechanism uses the path cache to make sure the ship travels from region-on-HL-path to other region-on-HL-path without doing PF calls in between. But the ship servicing is time based, it doesn't wait for the ship to finish its cached path.
15:57:35 <xarick> this is an edge case
15:57:39 <xarick> just figured something
15:59:54 <xarick> ship is at the edge of a region, hlpf found a path in the region the ship is at, but llpf pathes to the adjacent region, results in a path_cache.clear() as the last command
16:00:09 <xarick> then it checks if the cache is clear
16:00:26 <xarick> and generates a random track ๐Ÿ˜ฆ
16:01:01 <xarick> insufficient checks perhaps
16:01:19 <xarick> or there should be no random path choice
16:01:45 <xarick> and use the track chosen from the llpf
16:02:38 <xarick> i need to dig the PR history for this
16:04:08 <xarick> <https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_ship.cpp#L264> this is triggered right at the last entry, previously it's been adding tiles to the cache
16:04:42 <xarick> when it reaches <https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_ship.cpp#L279>
16:04:42 <xarick> it decides to get a random track ๐Ÿ˜ฆ
16:06:13 <xarick> I remember 279 was a fix to some edge case already ๐Ÿ˜ฎ
16:14:13 *** Wormnest has joined #openttd
16:19:36 <xarick> dang ๐Ÿ˜
16:20:49 <xarick> nevermind, I'm wrong
16:21:56 <xarick> the path was never cached at any point
16:23:03 <xarick> it did the checks whether to cache at some point, but always returned path_cache.clear()
16:26:37 <xarick> I'm confused, i need to re-do the tests ๐Ÿ˜ฆ
16:41:48 <kuhnovic> Keep in mind that the PF always returns the next track(dir). The cache just stores any subsequent dirs. So an empty cache is perfectly ok.
16:53:33 *** gelignite has joined #openttd
16:53:37 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290355885704613888/image.png?ex=66fc2910&is=66fad790&hm=eb0420555146d57416b6b0d5b7eafbc896fc1f299ab4a55a0559e394cae8bcce&
16:53:37 <xarick> trying to make sense of what's happening here
16:54:07 <xarick> the ship is behind the building, going into NE direction
16:54:23 <xarick> red line is the hlpf choice
16:54:31 <xarick> green line is the llpf choice
16:54:44 <xarick> ship is at the edge of the region
16:55:44 <xarick> now, what tracks did it pick...
16:59:37 <xarick> stoopid random choice sometimes makes track == track2
16:59:45 <xarick> so difficult to debug this way
17:06:18 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290359078400294922/image.png?ex=66fc2c0a&is=66fada8a&hm=f0afb33df2845ed8d28be7dcf6375926114282f32dcbcc11b856d74874059939&
17:06:18 <xarick> kek
17:20:27 <xarick> **first call**: all depots, 1 region 65,85 on hlp, depot at 64,85 chosen by llpf, path_cache is filled, return track from cache.
17:20:27 <xarick> **second call**: depot at 64,85, 2 regions 65,85 + 64,85 on hlp, depot at 64,85 chosen by llpf, path_cache is not filled, return random track due to empty cache.
17:21:15 <xarick> assert(track1 == track2) fails sometimes, sometimes not, thx to random
17:24:21 <xarick> node_water_patch_on_high_level_path is always false on first call
17:24:21 <xarick> node_water_patch_on_high_level_path is always true on second call
17:30:07 <xarick> oh, the red line is wrong on that screenshot
17:30:13 <xarick> dividing the areas
17:33:30 <xarick> nevermind it's correct
17:35:32 <xarick> is this while buggy? `while (node->m_parent) {`
17:35:48 <xarick> shouldn't it be while (node)
17:36:08 <xarick> otherwise, the last one is skipped!
17:38:59 <xarick> this is a bug
17:39:06 <xarick> I am 99% sure now
17:40:18 <DorpsGek> [OpenTTD/OpenTTD] RicaProEXP started discussion #12970: NEW INFLATION SETTINGS https://github.com/OpenTTD/OpenTTD/discussions/12970
17:47:02 <xarick> kuhnovic: <https://github.com/OpenTTD/OpenTTD/blob/master/src/pathfinder/yapf/yapf_ship.cpp#L253-L267> I think this while loop is skipping the last parent. Is that intended? when the node moves from tile 5616655 to node->parent, the tile is now 5616656, but then the while(node->m_parent) checks the parent of 5616656 and that happens to be null, essencially skipping the checks ๐Ÿ˜ฆ
17:50:12 <_glx_> no it's fine, last node is the vehicle itself
17:50:24 <_glx_> there's an assert ensuring that
17:50:47 <kuhnovic> Glx is right
17:51:41 <LordAro> :o
17:52:15 <xarick> the last node doesn't go through the tests... doesn't have a chance to be added to the cache
17:52:28 <_glx_> it doesn't need to be in the cache
17:52:39 <_glx_> it's the vehicle
17:53:30 <michi_cc[d]> kuhnovic: If the HL path cost is deterministic, I'd just store the last cost along with the depot. If the new cost is equal or lower, keep the depot (and update the cost), otherwise chuck the depot and start a fresh search.
17:54:37 <_glx_> it is deterministic, but there are specific corner cases I think
17:55:59 <kuhnovic> michi_cc[d]: It's not that simple. The LL pathfinder is allowed to steer the ship outside of the proposed HL path. That could mean going through a water region that is further away (from the perspective of the HL, which has limited information). That could indeed lead to nasty corner cases with the ship finding-and-chucking its depot over and over again.
17:56:27 <_glx_> but checking cost is between a given range might work
17:56:30 <DorpsGek> [OpenTTD/OpenTTD] flix1 commented on discussion #12970: NEW INFLATION SETTINGS https://github.com/OpenTTD/OpenTTD/discussions/12970
17:57:29 <_glx_> old_cost +/- reasonable difference
17:58:02 <kuhnovic> Yeah that's indeed what I'm trying out right now
17:58:10 <michi_cc[d]> Or a double cache, store last LL cost too, and if the HL cost rises, double check with a LL run.
17:58:46 <xarick> I think I understand now
17:58:48 <kuhnovic> Moar caching!
17:59:05 <michi_cc[d]> I don't think a second int will break the bank ๐Ÿ˜›
18:00:15 <xarick> it's CheckIfShipNeedsService bothering the pf while not entering a new tile
18:01:07 <xarick> but checkshipreverse is somehow working
18:01:37 <xarick> gonna investigate better
18:06:54 <kuhnovic> CheckIfShipNeedsService can bother the PF any time it wants, and it actually does it very often
18:07:31 <kuhnovic> checkShipReverse is not any better at fixing this. It might just happen to do the right thing in your specific case, but in essence it does the same thing as a regular chooseShipTrack call.
18:26:42 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP commented on discussion #12970: New inflation settings https://github.com/OpenTTD/OpenTTD/discussions/12970
18:29:47 <DorpsGek> [OpenTTD/OpenTTD] flix1 commented on discussion #12970: New inflation settings https://github.com/OpenTTD/OpenTTD/discussions/12970
18:37:16 <DorpsGek> [OpenTTD/OpenTTD] WenSimEHRP commented on discussion #12970: New inflation settings https://github.com/OpenTTD/OpenTTD/discussions/12970
18:38:18 <DorpsGek> [OpenTTD/OpenTTD] flix1 commented on discussion #12970: New inflation settings https://github.com/OpenTTD/OpenTTD/discussions/12970
19:01:40 *** Wolf01 has joined #openttd
19:24:11 <kuhnovic> So... oneplus nord 4 or google pixel 8a...
19:28:21 <_glx_> pixel is often overpriced
19:30:38 <xarick> Organizing my ideas:
19:30:38 <xarick> - FindNearestDepot must account for a ship departing from a dock where it may reverse. If it reverses, simulate the ship being on the reversed position. The next call comes from CheckShipReverse, where the ship actually reverses. And the next one is the ship actually doing a normal ChooseShipTrack to the depot.
19:30:38 <xarick> - FindNearestDepot must account for user to manually send ship to depot. Ship does not reverse, but the path should be searched both ways to prevent no nearest depot error when there's depots nearby.
19:30:38 <xarick> - FindNearestDepot must account automatic service. Ship does not reverse in this case. Path has a cost limit, meaning the first path chosen must stick when the next automatic service is called.
19:35:34 <kuhnovic> Whether or not the ship reverses shouldn't really be much of a concern. That's already too much of a low level detail if you ask me. Focus on the high level goals first (the first part of your sentences)
19:42:50 *** tokai has joined #openttd
19:42:50 *** ChanServ sets mode: +v tokai
19:49:44 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
19:55:54 <xarick> I wonder if i should just call CheckShipReverse unconditionally
19:57:33 <xarick> checkshipreverse with a buttload of depot tiles ๐Ÿ˜ฎ
19:57:40 <xarick> haven't tried yet
20:07:24 <xarick> lost my debugging commit ๐Ÿ˜
20:07:43 <xarick> let me check recycle bin
20:36:03 *** j0anjosep has quit IRC (Quit: User went offline on Discord a while ago)
20:51:49 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290415833578995722/image.png?ex=66fc60e5&is=66fb0f65&hm=10dfb05c6aed112f2900ff0ebf4b0e72503e9b3428974c2a5e54a47c219169f5&
20:51:49 <xarick> my new testing playground
20:51:59 *** gelignite has quit IRC (Quit: Stay safe!)
20:52:17 <xarick> the edges cases
21:08:15 <johnfranklin> https://cdn.discordapp.com/attachments/1008473233844097104/1290419968730464417/image.png?ex=66fc64bf&is=66fb133f&hm=afb78a677d89677d26f914d11aecd253212d653c605fddf51216ddbc612d1f5d&
21:08:15 <johnfranklin> added dP and peter1138...
21:09:49 <xarick> time for another night for assert testings
21:10:00 <xarick> on the 70k ship save
21:11:55 <xarick> well... short lived night, already got an assert
21:12:23 <xarick> https://cdn.discordapp.com/attachments/1008473233844097104/1290421006732890244/image.png?ex=66fc65b6&is=66fb1436&hm=c7e422e24d8a147a4d8b8a2d33447405c46472f2fec187a6cd48886bd0f4ea5b&
21:12:23 <xarick> what is it now
21:15:55 <xarick> oh, it's the same ship
21:16:26 <xarick> looks like I didn't handle the issue at all
21:16:36 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
21:30:05 <xarick> it's the same situation as my last screenshot :p
21:31:49 *** keikoz has quit IRC (Ping timeout: 480 seconds)
21:33:56 <belajalilija> johnfranklin: What did i do?
21:34:12 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
22:18:14 *** nielsm has quit IRC (Ping timeout: 480 seconds)
22:35:36 <_pruple> you know what you did, etc.
22:41:08 <belajalilija> I actually donโ€™t xd
22:41:21 <belajalilija> Though it may have been something a long time ago
22:41:33 <belajalilija> Simo is mentioned there and heโ€™s long gone
23:32:03 *** Flygon has quit IRC (Read error: Connection reset by peer)