Friday Facts #113 - Better rail building
Re: Friday Facts #113 - Better rail building
I thought that the great things about the A* algorithm is that the first solution it finds is optimal (given that some constraints on the heuristic it uses). The only reason that A* search will find a curved path before a curved path that is just as good is if the curves are tied in cost of rails (assuming that the rails used is the cost function). One way to make it prefer straight paths is to set the cost for curves used in the A* heuristic to be infinitesimally greater (1 millionth might work) than the plain cost in rails. The devs have probably all ready thought of everything I am saying but I would like more details on the rail A* algorithm to satisfy my curiosity.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Friday Facts #113 - Better rail building
Actually the curve cost would need to be larger by a decent factor, 4 curves can span the length of 12 straight pieces (if I got the math right) so curves need to be at least 3 times as expensive. Then you can add a small offset to make the algorithm prefer the straightsTrev_lite wrote:I thought that the great things about the A* algorithm is that the first solution it finds is optimal (given that some constraints on the heuristic it uses). The only reason that A* search will find a curved path before a curved path that is just as good is if the curves are tied in cost of rails (assuming that the rails used is the cost function). One way to make it prefer straight paths is to set the cost for curves used in the A* heuristic to be infinitesimally greater (1 millionth might work) than the plain cost in rails. The devs have probably all ready thought of everything I am saying but I would like more details on the rail A* algorithm to satisfy my curiosity.
Re: Friday Facts #113 - Better rail building
Please don't remove the option to manually place curved rails entirely...i can already see myself fighting against the algorithm that is not doing what i want it to do.
Make it a config option or something, power users will want to manually place curved rails in some cases.
Make it a config option or something, power users will want to manually place curved rails in some cases.
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
Re: Friday Facts #113 - Better rail building
I don't see any cases where this will happen,slindenau wrote:Please don't remove the option to manually place curved rails entirely...i can already see myself fighting against the algorithm that is not doing what i want it to do.
Make it a config option or something, power users will want to manually place curved rails in some cases.
The system is very robust, and... well you will see
Re: Friday Facts #113 - Better rail building
Just a small fact which left me wondering: in the FFF you state that the algorithm takes a lot of iterations for long and complicated paths, which don't really fit inside a single 1/60s game tick. As Factorio already supports multithreading, wouldn't it make sense to calculate the path fully asynchronous instead of a few steps per tick and update the interface in the next frame after the calculation has finished? Even if it takes a few ticks, the probability that anything changes in the given area which could possibly obstruct the rails is quite low. Since Factorio seemingly already creates a (fixed, small) thread pool, there is no real overhead for creating and joining the worker thread.
Re: Friday Facts #113 - Better rail building
I trust your skills, i won't judge this change until i've actually played with it in 0.13.Klonan wrote:I don't see any cases where this will happen,slindenau wrote:Please don't remove the option to manually place curved rails entirely...i can already see myself fighting against the algorithm that is not doing what i want it to do.
Make it a config option or something, power users will want to manually place curved rails in some cases.
The system is very robust, and... well you will see
If i find any problems, i'll let you guys know .
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
-
- Long Handed Inserter
- Posts: 97
- Joined: Thu May 14, 2015 12:54 am
- Contact:
Re: Friday Facts #113 - Better rail building
How would you build the rails without robots?
Edit: guess I missed this!
Edit: guess I missed this!
kovarex wrote:The work I'v shown there was mainly WIP.
I will make some note about it in the next FFF when the feature is finished completely.
There are basically two modes:Thanks for the notes about the double rail. Building double rail is very common thing, so I will probably try to find a way to make even double rail building possible.
- Manual mode (normal build), the planner length is limited to small rail distance (around 20), and it builds rails directly from the inventory. In this mode, the closest point to the cursor is used. No collisions are checked in this mode, so you don't build strange paths because of the one tree that was in the way. It is intended to be used to build small paths segments, while the overall plan of the path is planned by the player.
- Ghost mode (shift build the same as when building ghosts), the planner length is (almost) unlimited, it builds rail ghosts. It searches path to the exact point specified by cursor. It also allows to user to specify exact ending rotation if he wants to. It checks for collisions and it is intended to be used to build longer paths.
- brunzenstein
- Smart Inserter
- Posts: 1117
- Joined: Tue Mar 01, 2016 2:27 pm
- Contact:
Re: Friday Facts #113 - Better rail building
Isn't Ghost mode for robot build tracks only?AlexTheNotsogreat wrote:How would you build the rails without robots?
Edit: guess I missed this!kovarex wrote:The work I'v shown there was mainly WIP.
I will make some note about it in the next FFF when the feature is finished completely.
There are basically two modes:Thanks for the notes about the double rail. Building double rail is very common thing, so I will probably try to find a way to make even double rail building possible.
- Manual mode (normal build), the planner length is limited to small rail distance (around 20), and it builds rails directly from the inventory. In this mode, the closest point to the cursor is used. No collisions are checked in this mode, so you don't build strange paths because of the one tree that was in the way. It is intended to be used to build small paths segments, while the overall plan of the path is planned by the player.
- Ghost mode (shift build the same as when building ghosts), the planner length is (almost) unlimited, it builds rail ghosts. It searches path to the exact point specified by cursor. It also allows to user to specify exact ending rotation if he wants to. It checks for collisions and it is intended to be used to build longer paths.
Re: Friday Facts #113 - Better rail building
Thats what it sounds like.brunzenstein wrote:Isn't Ghost mode for robot build tracks only?AlexTheNotsogreat wrote:How would you build the rails without robots?
Edit: guess I missed this!kovarex wrote:The work I'v shown there was mainly WIP.
I will make some note about it in the next FFF when the feature is finished completely.
There are basically two modes:Thanks for the notes about the double rail. Building double rail is very common thing, so I will probably try to find a way to make even double rail building possible.
- Manual mode (normal build), the planner length is limited to small rail distance (around 20), and it builds rails directly from the inventory. In this mode, the closest point to the cursor is used. No collisions are checked in this mode, so you don't build strange paths because of the one tree that was in the way. It is intended to be used to build small paths segments, while the overall plan of the path is planned by the player.
- Ghost mode (shift build the same as when building ghosts), the planner length is (almost) unlimited, it builds rail ghosts. It searches path to the exact point specified by cursor. It also allows to user to specify exact ending rotation if he wants to. It checks for collisions and it is intended to be used to build longer paths.
I guess you could use the Ghost mode to plan a length of track (like using a blueprint without robots) and then use the Manual mode to build it in smaller segments.
- brunzenstein
- Smart Inserter
- Posts: 1117
- Joined: Tue Mar 01, 2016 2:27 pm
- Contact:
Re: Friday Facts #113 - Better rail building
Not so easy as the Ghost print vanishes after a few minutes - but...searker wrote:Thats what it sounds like.brunzenstein wrote:Isn't Ghost mode for robot build tracks only?AlexTheNotsogreat wrote:How would you build the rails without robots?
Edit: guess I missed this!kovarex wrote:The work I'v shown there was mainly WIP.
I will make some note about it in the next FFF when the feature is finished completely.
There are basically two modes:Thanks for the notes about the double rail. Building double rail is very common thing, so I will probably try to find a way to make even double rail building possible.
- Manual mode (normal build), the planner length is limited to small rail distance (around 20), and it builds rails directly from the inventory. In this mode, the closest point to the cursor is used. No collisions are checked in this mode, so you don't build strange paths because of the one tree that was in the way. It is intended to be used to build small paths segments, while the overall plan of the path is planned by the player.
- Ghost mode (shift build the same as when building ghosts), the planner length is (almost) unlimited, it builds rail ghosts. It searches path to the exact point specified by cursor. It also allows to user to specify exact ending rotation if he wants to. It checks for collisions and it is intended to be used to build longer paths.
I guess you could use the Ghost mode to plan a length of track (like using a blueprint without robots) and then use the Manual mode to build it in smaller segments.
soon we know...
Re: Friday Facts #113 - Better rail building
brunzenstein wrote:searker wrote:brunzenstein wrote:Not so easy as the Ghost print vanishes after a few minutes - but...AlexTheNotsogreat wrote:How would you build the rails without robots?
Thats what it sounds like.
I guess you could use the Ghost mode to plan a length of track (like using a blueprint without robots) and then use the Manual mode to build it in smaller segments.
soon we know...
I can build a lot of track in 5Min!
Choumiko wrote:It's a wonder how good the game is, if you consider how bad they are with the FFF numberssillyfly wrote:kovarex just posted the thread... but with #118 in the title. I think they had too much beer
Re: Friday Facts #113 - Better rail building
How do you use it?
Re: Friday Facts #113 - Better rail building
Check the entry on it here:Maja153 wrote:How do you use it?
http://guide.factorio.com/new-features-013.html
Re: Friday Facts #113 - Better rail building
That's greatKlonan wrote:Check the entry on it here:Maja153 wrote:How do you use it?
http://guide.factorio.com/new-features-013.html
However... can you remove or reduce this huge header?
Or maybe make it not static on the page?
Re: Friday Facts #113 - Better rail building
Yeah this is taking up a solid half of my screen.Zeblote wrote:However... can you remove or reduce this huge header?
Or maybe make it not static on the page?
Re: Friday Facts #113 - Better rail building
Bump it upZeblote wrote: However... can you remove or reduce this huge header?
Or maybe make it not static on the page?
-
- Manual Inserter
- Posts: 1
- Joined: Fri Jul 01, 2016 6:33 am
- Contact: