Spidertron repath if stuck

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1121
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Spidertron repath if stuck

Post by NotRexButCaesar »

Spidertrons can easily get stuck on water. If they repathed after failing to move where they want(reaching the edge of impassable terrain) they could reapath to their destination(hopefully taking into account the spidertrons gap breaching ability) preventing them getting stuck. This behavior could be implemented for occupied spiders only if UPS concerns are an issue
—Crevez, chiens, si vous n'étes pas contents!

User avatar
Nosferatu
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: Spidertron repath if stuck

Post by Nosferatu »

AmericanPatriot wrote:
Thu Sep 03, 2020 1:20 am
(hopefully taking into account the spidertrons gap breaching ability)
I guess that's the part that is the most work for the devs.
Personally I would not mind if spidertron first trys to go the direct route and if it gets stuck it paths like a normal land unit would do.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Spidertron repath if stuck

Post by Qon »

It's actually really simple to make a simple "better then only straight line walking" algorithm that can walk around water with 0 planning calculations, only taking the local environment in account. It might actually improve performance because spiders that are stuck on water trying to reach with their legs for something are actually really bad for UPS, while spiders walking on flat terrain are better (in my experience testing 100+ spiders at once, Broodmother mod dev).

It's almost very fittingly called the bug path finding algorithm or bug obstacle avoidance algorithm. https://aishack.in/tutorials/obstacle-a ... algorithm/
Image

You just choose a direction (maybe always left, maybe depending on which direction is the least change from the direction to the goal) and walk around the body of water until you get an unobstructed path towards the goal again. All checked locally, which the spider must already do to find places to put down its feet.

Could be implemented as a somewhat simple mod with almost minimal UPS impact. Wouldn't be as effiecient as if it was integrated in the game itself, but still pretty good and also less UPS impact than biter path planning like some mods fit onto their automatic vehicles. It wouldn't give the shortest paths, and it might not even guarantee that it finds the goal eventually even when there is a path (was a while since I read about it), and it would probably walk in circles forever (following the shore) if you tell it to go to a far off island and no land bridge is ever built. But it could be much better than what we have.

Edit: the link and image isn't quite the algorithm I was thinking about while writing the post. It's an alternative that might give stronger guarantees but requires the spider to walk about 1 and a half lap around the body of water it encounters. Reading through it now.

Edit:
Another bug obstacle avoidance algorithm closer to what I described.
Image

Edit:
Bug-0, Bug-1 and Bug-2 described here with video examples.
Bug-0 and Bug-2 both seem reasonable.

TheRaph
Fast Inserter
Fast Inserter
Posts: 226
Joined: Sun Sep 24, 2017 6:31 pm
Contact:

Spidertron path finding (RC)

Post by TheRaph »

short and easy

Currently the remote controlled spidertron has no pathfinding (as devs say). So it may stuck at big lakes.

I suggest to add kind of pathfinding to remote controlled spidertron.

Backgrounds and screenshots could find on "not-a-bug"-bug here.

Vykromod
Inserter
Inserter
Posts: 46
Joined: Tue Jan 05, 2016 10:40 pm
Contact:

Re: Spidertron path finding (RC)

Post by Vykromod »

Seriously, this is such an essential thing, I can't imagine the reasoning behind the decision to not make the Spidertron pathfind around the lakes. Having it get stuck on every body of water it comes across, it makes the remote quite useless. You've got no choice but to babysit it along the way, but then what's the point if you can just get in and drive it yourself.

Koub
Global Moderator
Global Moderator
Posts: 7203
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Spidertron repath if stuck

Post by Koub »

[Koub] Merged into older thread requesting better spidertron pathfinding.
Koub - Please consider English is not my native language.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Spidertron path finding (RC)

Post by Qon »

Vykromod wrote:
Fri Oct 02, 2020 9:11 am
Seriously, this is such an essential thing, I can't imagine the reasoning behind the decision to not make the Spidertron pathfind around the lakes.
I can. Pathfinding is expensive. Since the spidertron almost doesn't collide with things it can "fly" almost anywhere and doesn't really need pathfinding for the most part, so it can be as UPS efficient as flying robots.
Vykromod wrote:
Fri Oct 02, 2020 9:11 am
Having it get stuck on every body of water it comes across, it makes the remote quite useless. You've got no choice but to babysit it along the way, but then what's the point if you can just get in and drive it yourself.
Or you can landfill lakes. You don't have to fill lakes completely, just enough that spidertron can walk over it. Something like 12 tiles space max.
And then there's mods. They probably didn't have time to make waypointing and all the other cool features that are missing but are now implemented as mods.

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: Spidertron repath if stuck

Post by Impatient »

+1

Repeatedly I wonder 'Where is that 'tron I called back to main base earlier?' Just to find it stuck somewhere on water. Of course, once I know, that the path to a certain destination has water in the way, I set move orders accordingly. But there are unlimited possibilities for a "first time" on a map in factorio. So this problem does not really go away by learning that one route is risky. :lol: It only goes away when planing the whole route from start to finish.

Post Reply

Return to “Ideas and Suggestions”