Spidertron repath if stuck
Moderator: ickputzdirwech
- NotRexButCaesar
- Smart Inserter
- Posts: 1124
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Spidertron repath if stuck
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!
Re: Spidertron repath if stuck
I guess that's the part that is the most work for the devs.AmericanPatriot wrote: ↑Thu Sep 03, 2020 1:20 am(hopefully taking into account the spidertrons gap breaching ability)
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.
Re: Spidertron repath if stuck
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/
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.
Edit:
Bug-0, Bug-1 and Bug-2 described here with video examples.
Bug-0 and Bug-2 both seem reasonable.
It's almost very fittingly called the bug path finding algorithm or bug obstacle avoidance algorithm. https://aishack.in/tutorials/obstacle-a ... algorithm/
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.
Edit:
Bug-0, Bug-1 and Bug-2 described here with video examples.
Bug-0 and Bug-2 both seem reasonable.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Spidertron path finding (RC)
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.
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.
Re: Spidertron path finding (RC)
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.
Re: Spidertron repath if stuck
[Koub] Merged into older thread requesting better spidertron pathfinding.
Koub - Please consider English is not my native language.
Re: Spidertron path finding (RC)
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.
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.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: Spidertron repath if stuck
+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. It only goes away when planing the whole route from start to finish.
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. It only goes away when planing the whole route from start to finish.