Config
Log for #openttd on 11th July 2022:
Times are UTC Toggle Colours
00:08:01  *** Soni has quit IRC
01:13:06  *** Wormnest has quit IRC
01:32:34  *** Soni has joined #openttd
01:34:25  *** Montana_ has quit IRC
02:09:52  *** D-HUND has joined #openttd
02:13:21  *** debdog has quit IRC
02:24:28  *** D-HUND is now known as debdog
03:20:07  *** glx has quit IRC
04:24:14  *** felix_ has quit IRC
04:24:32  *** felix has joined #openttd
05:23:43  *** WormnestAndroid has quit IRC
05:23:45  *** WormnestAndroid has joined #openttd
05:45:33  *** andythenorth has joined #openttd
06:04:01  *** Smedles has quit IRC
06:04:34  *** Smedles has joined #openttd
06:07:36  *** andythenorth has quit IRC
06:12:26  *** Flygon has joined #openttd
06:20:57  *** andythenorth has joined #openttd
06:22:07  *** sla_ro|master has joined #openttd
07:12:50  *** andythenorth has quit IRC
07:51:34  *** andythenorth has joined #openttd
08:04:25  *** andythenorth has quit IRC
08:08:28  *** andythenorth has joined #openttd
08:50:10  *** rafalk42 has joined #openttd
08:50:39  *** Samu has joined #openttd
09:20:44  *** rafalk42 has quit IRC
09:47:35  *** WormnestAndroid has quit IRC
10:24:46  *** sla_ro|master has quit IRC
10:35:12  *** supermop_work has quit IRC
10:40:50  *** WormnestAndroid has joined #openttd
11:09:35  *** andythenorth has quit IRC
11:17:37  *** andythenorth has joined #openttd
11:21:45  *** WormnestAndroid has quit IRC
11:26:36  *** WormnestAndroid has joined #openttd
11:30:30  *** tokai|noir has joined #openttd
11:30:30  *** ChanServ sets mode: +v tokai|noir
11:37:21  *** tokai has quit IRC
12:33:41  *** glx has joined #openttd
12:33:41  *** ChanServ sets mode: +v glx
12:37:40  <Samu> i think i did it
12:38:42  <Samu> this time the tracks can be build much closer together https://i.imgur.com/0Hgnv9y.png
12:43:30  <glx> with all these loops it really looks like a broken pathfinder
12:44:17  <LordAro> are you sure you're not maximising the path cost, rather than minimising it?
12:44:34  <Samu> just tried 90 degrees and it found no path, very strange
12:46:39  <Samu> strange
12:46:58  <Samu> if i forbid 90 degrees by design, it can find a path
12:47:13  <Samu> if i put a cost to 90 degrees turn equal to max cost, it can't find
12:47:38  <Samu> possibly something to do with the queue
12:48:07  <Samu> but ... no path?
12:48:10  <Samu> very odd
12:54:12  <Samu> the more i think i know, the less I do
13:00:47  <Samu> what I think goes wrong: directions again
13:02:35  <Samu> what happens when a neighbour (a 90 degrees one) fails to pass the cost check
13:02:49  <Samu> it doesn't go into the Open
13:03:16  <Samu> only those that pass 90 degrees go into open, and can then be put on the closed list
13:03:42  <Samu> nah, i can't visualize it
13:05:19  <Samu> maybe the goal segment isn't being detected?
13:05:39  <Samu> but that would be even more stranger, cus it is already working for the other cases
13:23:36  *** wallabra_ has joined #openttd
13:28:26  *** wallabra has quit IRC
13:51:09  <Samu> very strange, i put coast cost = 0
13:51:17  <Samu> and it now can find a path for 90 degrees
13:56:43  <Samu> why the heck is it now building
13:56:57  <Samu> lol... nice that it builds, but i really wanted to understand why
14:01:45  <Samu> I added the node ID check
14:01:55  <Samu> and apparently it was needed
14:02:01  <Samu> cus now it can build
14:03:09  <Samu> but by doing this, I open a precedent for whenever I need to build bridges/tunnels
14:03:48  <Samu> how am I going to relly on nodeID for collisions
14:08:12  *** nielsm has joined #openttd
14:24:45  <Samu> https://gist.githubusercontent.com/SamuXarick/caf58b50090a1ce2282417d0417ed5ff/raw/7621cb2f6b8fcafdf61efeab87061e2bc646eb40/gistfile1.txt
14:25:01  <Samu> i think im storing too much information about a tile
14:32:11  <FLHerne> Samu: without reading the last month of scrollback, what is this supposed to be doing?
14:32:23  <Samu> dual rail pathfinding
14:32:26  <FLHerne> standard A*-like pathfinder for rails?
14:32:27  <FLHerne> ah
14:32:49  <FLHerne> are you trying to find both rails in parallel at the same time?
14:32:54  <Samu> yes
14:33:00  <Samu> has it been done?
14:33:34  <FLHerne> not sure
14:34:02  <LordAro> trains & choochoo are the only ones i'm aware of that explicitly do dual rails
14:34:03  <FLHerne> most of the dual-track AIs build one, then try to build the other track parallel, and sometimes fail in an ugly way
14:34:53  <FLHerne> I'm sure there was a second one before trAIns
14:35:33  <Samu> what does trAIns actually do?
14:35:49  <Samu> whatever it does, it looks good
14:36:18  <LordAro> pretty sure it was the topic of the author's master's thesis
14:36:22  <LordAro> there's a pdf somewhere...
14:36:48  <Samu> I was trying to figure on my own how to do it, but...
14:36:59  <FLHerne> Samu: read section 4.1 of http://www.sbgames.org/papers/sbgames09/computing/full/cp24_09.pdf
14:37:27  <FLHerne> so the answer is yes, it does do pretty much what you're trying to
14:38:19  <Samu> oh, wow, he has pictures
14:39:12  <LordAro> https://project.dke.maastrichtuniversity.nl/games/files/bsc/Konijnendijk_BSc-paper.pdf apparently someone's built on it too
14:57:38  <Samu> wow, i need to look at trAIns A* implementation
14:57:49  <Samu> he switched some ordering of stuff
14:58:00  <Samu> maybe i need to do something similar?
15:10:18  *** sla_ro|master has joined #openttd
15:27:32  *** virtualrandomnumber has joined #openttd
15:27:37  *** virtualrandomnumber has quit IRC
15:32:32  <Samu> https://github.com/lhrios/trains/blob/master/railroad/railroad_double_track_parts.nut#L108
15:32:36  <Samu> heh, 20 parts
15:33:19  <Samu> 22 with tunnel and bridge
15:33:27  <Samu> i haven't though of them yet
15:34:18  <Samu> I won't create junctions, i wont need depot parts
15:34:29  <Samu> not on my plans
15:35:04  <Samu> he uses a single base tile
15:35:18  <Samu> i use 2, one per lane
15:36:17  <Samu> he calls them DoubleTrackParts, I call them SegmentDir
15:37:57  *** WormnestAndroid has quit IRC
15:39:02  *** WormnestAndroid has joined #openttd
15:39:05  *** WormnestAndroid has joined #openttd
15:40:37  *** WormnestAndroid has quit IRC
15:40:38  *** WormnestAndroid has joined #openttd
15:56:28  *** HerzogDeXtEr has joined #openttd
15:56:38  *** Tirili has joined #openttd
16:10:41  *** sla_ro|master has quit IRC
16:33:24  *** Smedles_ has joined #openttd
16:33:38  *** Smedles has quit IRC
16:33:55  *** Smedles_ has quit IRC
16:35:39  *** Smedles has joined #openttd
17:01:49  *** Wolf01 has joined #openttd
17:13:27  <Samu> alright, the only part I'm interested in is how he handled the so called "directions", to check if it is already in the closed list
17:16:00  <Samu> https://github.com/lhrios/trains/blob/master/railroad/a_star.nut#L220-L241
17:16:57  <Samu> relatively simple compared to my approach :(
17:21:04  <Samu> i already use 3 differ2022

Powered by YARRSTE version: svn-trunk