Page 4 of 5

Re: Friday Facts #113 - Better rail building

Posted: Sat Nov 21, 2015 5:58 pm
by cube
Smarty wrote:0.12.18 released today hu? :P
Yeah, sorry for that, something broke again. Monday.

Re: Friday Facts #113 - Better rail building

Posted: Sat Nov 21, 2015 6:12 pm
by Smarty
cube wrote:
Smarty wrote:0.12.18 released today hu? :P
Yeah, sorry for that, something broke again. Monday.
no worries ;)

Re: Friday Facts #113 - Better rail building

Posted: Sat Nov 21, 2015 8:20 pm
by nocturnalAndroid
kyborek wrote: I was thinking exactly the same. The only reason i can think of for such solution is the one where prefering curves and then counting a bit more after solution is found is on average faster than preferring straight rails that lead to nowhere. Such issue should still be solved by A* algorithm anyway but i don't know how does the both-way variant work.

Hmmm, I didn't think about the two way thing, that might create some strange situation, though I'm not sure how it's implemented so it's hard to speculate. Also, your point about preferring curves seems plausible as the straight track is shorter and therefor will create deeper search trees. But, a track length metric seems to me like the most sensible one. If you go by number of rails pieces it might be hard to come up with an admissible heuristic, which, come to think of it, must be the issue, as an admissible heuristic guarantees optimally (I think...)

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 22, 2015 2:13 am
by Nemoricus
Would it be possible to add 'waypoints' to the rail planner? That is, you can tell the planner that you want the rail to pass through certain points on its route to the destination. While, yes, you could get this by building the rail in segments, this would allow you to see what the results would be before you commit to building the final track.

And I'll echo the others in asking for the ability to build any direction or shape of track by hand. Sometimes you want that fine control.

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 22, 2015 4:40 am
by aRatNamedSammy
kovarex wrote:
hitzu wrote:One question: why this algorithm avoid trees? If it works like a blueprint doesn't it should just lay tracks on top of the trees marking them to be removed?
It will probably work the same way as blueprints. When you hold shift, trees get ignored.
:O.. love it... ability to choose , ignore or not, .. love that feature since on blueprints.... and laying tracks will work same way :mrgreen: extra nice !!

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 22, 2015 6:15 am
by GeniusIsme
To perform a bidirectional search, one does not need to run two instances of algorithm, looking for their results to intersect. Use abstraction power of A*. Let it add rails to solution at both ends and compute you heuristic based on endpoint of each track (one from beginning, one from end).

Speaking of heuristics, euclidean is admissible, but not very informative here. That can be profitable to explore incentives to place curves to rotate to other end direction and/or not to place curves which derail :) path from meeting with other end. These could cut a lot of search space.

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 22, 2015 9:12 am
by vaderciya
Looking forward to using the new rail system :D

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 22, 2015 12:18 pm
by ssilk
What I just thought through: The algorithm can be used also to create
- rails-tracks by using already existing rails. A problem here is the direction, given by signals (distinction between one-way rail and two-way rails) (*)
- pipes (shortest way between two points, which uses already existing pipes (which should be of course from the same liquid-type, that would be a cool feature, see https://forums.factorio.com/forum/vie ... =6&t=17286 ))
- belts (inclusive underground belts under rails or other belts)
- poles, roboports (any item which needs to be connected from A to B)
- paths/routes for natives, and/or automatic driven vehicles.

This is GREAT!

(*) I see an extension to the rail-layer-mod: I just say "Create a track from station A (the origin station for the raillayer) to (unconnected) station B. Start."
You can slowly walk to station B, while the raillayer lays the rails to that station. A cool problem is to lay double- (triple-, quadruple?) tracks.

Re: Friday Facts #113 - Better rail building

Posted: Mon Nov 23, 2015 10:26 am
by vaderciya
Something I just thought of:

How will placing the rails with the new system work if you don't have a personal roboport?

I apologize in advance if this has been brought up but when I was skimming through the replies I didn't see anything

Re: Friday Facts #113 - Better rail building

Posted: Mon Nov 23, 2015 1:43 pm
by ssilk
vaderciya wrote:Something I just thought of:

How will placing the rails with the new system work if you don't have a personal roboport?

I apologize in advance if this has been brought up but when I was skimming through the replies I didn't see anything
We have the same question: https://forums.factorio.com/forum/vie ... 40#p117856

Re: Friday Facts #113 - Better rail building

Posted: Mon Nov 23, 2015 1:51 pm
by kovarex
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:
  • 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.
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.

Re: Friday Facts #113 - Better rail building

Posted: Mon Nov 23, 2015 3:59 pm
by goertzenator
For the pre-robot game I'd love to have a "build ghosts" button that constructs all ghost objects within the players build radius with items from his/her inventory. In other words, it works like a very short range manually-activated personal roboport. This way you don't need a manual rail mode; you just lay the ghost track down and then walk the track's path hammering the "build ghosts" button to lay the actual rail. This of course is useful beyond just railway tracks.

Re: Friday Facts #113 - Better rail building

Posted: Mon Nov 23, 2015 4:26 pm
by Drury
goertzenator wrote:For the pre-robot game I'd love to have a "build ghosts" button that constructs all ghost objects within the players build radius with items from his/her inventory. In other words, it works like a very short range manually-activated personal roboport. This way you don't need a manual rail mode; you just lay the ghost track down and then walk the track's path hammering the "build ghosts" button to lay the actual rail. This of course is useful beyond just railway tracks.
I like this idea, an argument can be raised though that it would diminish the importance of robots, especially personal roboport.

Then again, I do support this.

Re: Friday Facts #113 - Better rail building

Posted: Tue Nov 24, 2015 3:12 am
by obstinate
Oh god I want this.

Re: Friday Facts #113 - Better rail building

Posted: Tue Nov 24, 2015 12:15 pm
by Kuro-Maii
I do not really get why everybody is asking how it will work "pre(-personal)-roboport"
here is why:
The player has a range she/he can place things in the world, beyond this range the game make an error sound.
so if you where to "auto build" beyond that player range I would guess that the game either informs with an error sound that the player is being silly, or place what the player can reach and then tells the player that beyond that is just being silly..

If you have the research done for blueprints the player can place a ghost image of anything by holding shift ( or your remapped equivalent )
in this case it does not matter if you have roboports ( personal or normal ) or not when the player goes to make a "long" track ( beyond place-able range ) I would expect the game to place a ghost, as if I held shift and clicked them one by one myself.
If I where to hold down shift in this case I would expect the blueprint style of placing marking all trees in the way of the optimal path for removal.

If I do this beyond the range of the construction network ( personal or the one of the base, if any ) I can then just run around axe the the trees to move, or plow with the shotgun, and place the track myself on the ghost images the game planned for me.

Re: Friday Facts #113 - Better rail building

Posted: Tue Nov 24, 2015 1:51 pm
by SHiRKiT
I personally use PocketRobots from start mod on all my games.

So, a request: can we force just using straight lines? 0-45-90-135-180-225-270-315

Re: Friday Facts #113 - Better rail building

Posted: Tue Nov 24, 2015 2:36 pm
by Martc
kovarex wrote: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.
Auto-placing signals after specified distance would be also nice. Especially on double rail track.

Re: Friday Facts #113 - Better rail building

Posted: Thu Nov 26, 2015 11:32 am
by Peter34
Drury wrote:I like this idea, an argument can be raised though that it would diminish the importance of robots, especially personal roboport.
No. Because one Personal RoboPort isn't important to begin with. The beauty of them only happens when you install several into your modular armour.

Each RoboPort adds to your area total, and your actual area is then the square root of your area total. IIRC, its 400 tiles per Personal RoboPort, thus with one you have an area of 20x20 tiles, 10 tiles out in each direction from your current location. Add a second RoboPort and you have 800 tiles, which is 28x28 tiles, much sweeter already. A third one and you have 34x34 tiles. Four gives 40x40, and so forth.

Nobody uses just one Personal RoboPort. Not if they have a 7x7 or larger armour.

Re: Friday Facts #113 - Better rail building

Posted: Sun Nov 29, 2015 3:55 am
by wwdragon
Wow! That new rail building looks like it'll really save on effort! :-D

Re: Friday Facts #113 - Better rail building

Posted: Thu Mar 17, 2016 5:57 am
by steinio
I guess this S shapes everywhere would look silly in the whole factory. Why did the algorithm not just plan a straight route through the forest? This would also cost less resources.

Just wondering.
steinio