Droids Pathfinding

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Namoth
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Mar 03, 2017 4:44 pm
Contact:

Droids Pathfinding

Post by Namoth »

simple , I looked around and dident see any thread on the topic so..i guess no one ever built a factory that streches out in any wierd angle ? or ploted bot bases along a railway to the untaped resources ?

so.. basicly be it that you made a 'highway' of droid bases along the train tracks to the mines
or just got a wierd shaped base due to difficulty lvls ?

Example I...am..so....tierd......
of constantly loseing 7k construction drones becuse rather then to do pathfinding bettwen stations when they need to travle far..
so do they all down to the last one repeatedly take my highly vauled materials with them go straight out into the no man lands zone ..run out of fuel and be target practise for a passing biter attack or just get crushed by one thats at the walls right away.

Now I am no coder myself but i fail to see why one wouldet be able to add such a 'highway' variable for ther pathfinding to rather plot it along connected recharge bases then to presist in flying out into a war zone or a lake and then die or spend 5 times more time flying back to the recharge station on resserv power delaying the cosntruction or repear :/

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Droids Pathfinding

Post by Yoyobuae »

Reason: when you have 10000 bots around all that pathfinding would slow your CPU to a halt.

Namoth
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Mar 03, 2017 4:44 pm
Contact:

Re: Droids Pathfinding

Post by Namoth »

that reason feels like the cpu should melt just by the algorithm when they need to find a recharge station when empty on energi or how they need to change course in droves when runing out in the middle of noman lands ...so
is there some specific math problem for why factorio can handle 5k logistic bots zipping around and 1 k constrution bots not to mention each one handleing a mini inventory....but you cant add a tiny optimisation variable to ther pathfinding ?

Yoyobuae
Filter Inserter
Filter Inserter
Posts: 499
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: Droids Pathfinding

Post by Yoyobuae »

I'm just repeating what I heard from the devs.

Pathfinding algorithms are much more computationally intensive than everything else you mentioned. Pathfinding is a performance concern for trains. That should tell you something about how costly it can be.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Droids Pathfinding

Post by posila »

Think of the lack of robot intelligance as constrain the game puts on you. You have to design your base around it. Build separate networks and connected them by train, for example.

mattj256
Fast Inserter
Fast Inserter
Posts: 203
Joined: Sun Mar 27, 2016 7:25 am
Contact:

Re: Droids Pathfinding

Post by mattj256 »

Or don't build your base in a horseshoe shape. Yes, I agree that this behavior is unlikely to change so it's just a constraint to work around.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Droids Pathfinding

Post by ssilk »

Added to viewtopic.php?f=80&t=18093 Roboport/Logistic Network/Robot enhancements
See Handling of Robot-Routing / Pathing / Charging

Current state of discussion: This is only needed, if the game would need us to build U-shaped robot-areas. But that is not the case. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

mattj256
Fast Inserter
Fast Inserter
Posts: 203
Joined: Sun Mar 27, 2016 7:25 am
Contact:

Re: Droids Pathfinding

Post by mattj256 »

ssilk wrote:Current state of discussion: This is only needed, if the game would need us to build U-shaped robot-areas. But that is not the case. :)
If you have a large lake/ocean, it would be nice if the robots followed the base instead of taking the most direct path and running out of power over the ocean.
I don't expect this to be changed, I'm just saying there are cases where a U shape is the most natural shape for the base.

vtx
Fast Inserter
Fast Inserter
Posts: 150
Joined: Tue Jun 28, 2016 9:48 am
Contact:

Re: Droids Pathfinding

Post by vtx »

mattj256 wrote:
ssilk wrote:Current state of discussion: This is only needed, if the game would need us to build U-shaped robot-areas. But that is not the case. :)
If you have a large lake/ocean, it would be nice if the robots followed the base instead of taking the most direct path and running out of power over the ocean.
I don't expect this to be changed, I'm just saying there are cases where a U shape is the most natural shape for the base.
You can build artificial island with landfill to place robotport to relay both side of lake where bot can recharge.

Namoth
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Mar 03, 2017 4:44 pm
Contact:

Re: Droids Pathfinding

Post by Namoth »

Land mass or water amss reasons for base or more specificly robot port layout is perhaps often secondary to the simple reason your main factory is at location A..and the material desposits you lay out a 'robot highway' to in roder to just smack down the blueprint station + mining grind is..very..very..very..raairly..in a straight line from your base.

and while one have to understand if its a algorithm limitation ''factorio is after all impressing in the area of shit going on anyway'' but i cant help to wonder if you cant add a sub-rutine to ther script for detecting robo base coverage to 'limit' ther allowed pathways in a both logical and practial way after all you rairly lunched satelites beffore you got bots so it means they either recive all ther guidance from the ports transmisions or have onboard processing power while useing the ports to navigate the area.

and a comperasion could be made for the brief history of the 50's comunication and navigation beffore gps and satelite cover became a thing

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Droids Pathfinding

Post by Deadly-Bagel »

It's almost like robots aren't designed for long distance transportation.
Money might be the root of all evil, but ignorance is the heart.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Droids Pathfinding

Post by ssilk »

Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
OdinYggd
Fast Inserter
Fast Inserter
Posts: 200
Joined: Wed May 25, 2016 12:55 pm
Contact:

Re: Droids Pathfinding

Post by OdinYggd »

The pathfinding consists of point to point how can I get there in the minimum distance and thus flight time.

They pull work from a simple queue, check if it can be performed, and if it can go do it. If they can't it goes back into the queue to be checked again later.

Horseshoe shaped networks and those that enclose a large area of unused space are well known to be problematic because the simple pathfinding is unable to negotiate around hazards or realize that if it tries to fly over the lake it will run out of power and take forever to get there.

Bots are also notoriously unintelligent when it comes to seeking a recharge. They'll wait for hours near a particular roboport that is congested rather than flying a little ways further to reach a roboport that has open charger space.


A big part of why they are so dumb is because everything has a CPU cost. And when you start to put a few thousand of them in the air at once, that cost adds up until the game performance has evaporated.
In my mind, Steam is the eternal king of the railway.

Avezo
Filter Inserter
Filter Inserter
Posts: 451
Joined: Fri Apr 01, 2016 3:53 pm
Contact:

Re: Droids Pathfinding

Post by Avezo »

Enabling performance-heavy pathfnding algorithms for all bots isn't neccesary. Just checking for 'lost' bots that couldn't reach destination in given time (i.e. lost between two ends of horseshoe network) and enabling advanced pathfinding only for those bots should be much less of a problem for performance. Sure it will be still a problem if someone builds weird shaped network and put tons of bots in it, but it already is like this with big enough bases anyway.

User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Droids Pathfinding

Post by Deadly-Bagel »

Maybe it doesn't sound like it but I don't think it's as simple as you make it out to be.

First of all how do you check for lost bots? Okay so you've got "couldn't reach destination in given time" so you need to calculate the distance the bot has to travel and compare that to the distance it can cover with its current charge level (remember this is variable with bot speed research and modded bots), and then what? You would then need to check if the point the robot decides it needs to charge is close enough to a roboport to make it there, repeating until the robot can complete its journey, and you would need to do all this every time a robot looks up a destination.

Still doesn't sound like enough processing? Well then factor in personal logistics, the player is a non-static destination and can easily move faster than even the quickest robots. Perhaps you started in a "safe" pathfinding area but then moved to an "unsafe" area, then what?
Money might be the root of all evil, but ignorance is the heart.

Post Reply

Return to “Ideas and Suggestions”