Why pathfinding is so bad?

Post all other topics which do not belong to any other category.
Porter65
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Mar 06, 2016 10:32 pm
Contact:

Why pathfinding is so bad?

Post by Porter65 »

The pathfinding in the game is just atrocious. Between vehicles wandering off by +50% then backing down and vehicles who get stuck constantly ... I can't understand why the dev team, which is obviously very good and talented, don't have a pathfinder which is somehow at the level of the x gazillions of RTS games made since the dawn of Humanity (which is circa the Pong game :mrgreen: )

Seriously. This can't be a technical issue, from guys who can do marvel with your CPU and GPU. So, why? They don't see a point in improving it?
User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: Why pathfinding is so bad?

Post by 5thHorseman »

The only autonomous vehicles in this game are trains that can't wander off the rails and robots that always go straight at their target.

My guess is you're talking about bots, and your logistic network is too big and/or you don't have good roboport coverage.
astroshak
Filter Inserter
Filter Inserter
Posts: 639
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Why pathfinding is so bad?

Post by astroshak »

My guess is he’s talking about AAI. That, or a fleet of Spidertrons.

Spidertrons just go in a straight line, from their current position (Point A) to their destination (Point B). If there is any water they cannot cross in the way, they get stuck and have to be micromanaged around it. Ideally, use waypoints to get around the water. Water is, ironically enough, the only thing that can really stop a Spidertron, they just step over everything else.

AAI uses biter path finding, and as the author suggested when he wrote it, that path finding is “derpy”. Thing is, its “good enough” for the biters, and they are able to provide some pressure on the player. There is no need to improve upon it, not for a mod. They did anyway, at some point - something about them all moving around obstacles instead of some stopping to chew on them, meaning they all arrive at the factory as one large clump rather than a strung out series of clumps.

Unfortunately for the biters, they are not meant to be a serious RTS style challenge for the player. Instead, they are meant to just be some pressure, a resource sink into which the player puts defensive then offensive efforts. I would not expect them to improve the biter AI. The game is very highly optimized as it is, and increasing the CPU time spent on the biters would almost undoubtedly cause some other aspect to suffer.
Porter65
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Mar 06, 2016 10:32 pm
Contact:

Re: Why pathfinding is so bad?

Post by Porter65 »

Yes, the issue is the Biters AI, which is indeed used in several mods using vehicles.

I would beg to differ though on what the goal of the game could be! The community, probably like the Anno community, is split between people who put first and foremost the Logistic chain of the game and the ones who like some real tough 'biter' challenge, hence the Death World setting.

So not providing a better pathfinding ... Well indeed, perhaps it is seen as good enough by the devs. In fact I can only think of this explanation, given how talented they are and how generous of their working hours they are ... So that's a choice from them. Too bad, I guess. :ugeek:
Kyralessa
Filter Inserter
Filter Inserter
Posts: 588
Joined: Thu Sep 29, 2016 5:58 pm
Contact:

Re: Why pathfinding is so bad?

Post by Kyralessa »

So really you're asking why a tool that wasn't designed to be used a certain way doesn't work when used that way?
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Why pathfinding is so bad?

Post by Hannu »

astroshak wrote: Tue Mar 16, 2021 9:03 am Unfortunately for the biters, they are not meant to be a serious RTS style challenge for the player. Instead, they are meant to just be some pressure, a resource sink into which the player puts defensive then offensive efforts. I would not expect them to improve the biter AI. The game is very highly optimized as it is, and increasing the CPU time spent on the biters would almost undoubtedly cause some other aspect to suffer.

This is true. Factorio is made for extreme megabase building and all other aspects have been at lower priority. They have made magnificient job, Factiorio is extremely effectively programmed game which can handle much more complex systems than any other game I have seen, but in my opinion they have gone too far and rejected good ideas for one objective. I would like to have more "intelligent" biters, bots etc. even if it made maximum practical size of production 4000 SMP instead of 8000 SMP. I also do not expect it to change, megabase optimizaion is too fundamental philosophy of this game.
Porter65
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Mar 06, 2016 10:32 pm
Contact:

Re: Why pathfinding is so bad?

Post by Porter65 »

Kyralessa wrote: Tue Mar 16, 2021 9:53 am So really you're asking why a tool that wasn't designed to be used a certain way doesn't work when used that way?
You should be less certain that your way of playing is the only way.

That said, Spiderdron also have an issue. Biters have constant issues, stuck against cliffs. That's part of the vanilla experience. It does not feel that illegitimate to ask for a better pathfinding, if only for Biters.

But I'll also dare say that modders are making part of Factorio success. So why not help talented modders, like Earendel with AAIvehicles have better mods? That's a win-win situation.

It's like saying that Rimworld mods should not be supported because they add nothing to the game. They do. Same as Factorio mods. Your argument of rejecting any improvement because they are used in mods in thus invalid.
Kyralessa
Filter Inserter
Filter Inserter
Posts: 588
Joined: Thu Sep 29, 2016 5:58 pm
Contact:

Re: Why pathfinding is so bad?

Post by Kyralessa »

Porter65 wrote: Tue Mar 16, 2021 10:14 am
Kyralessa wrote: Tue Mar 16, 2021 9:53 am So really you're asking why a tool that wasn't designed to be used a certain way doesn't work when used that way?
You should be less certain that your way of playing is the only way.
I'm speaking specifically about the notion of using biter pathfinding for things that are not biters.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1623
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Why pathfinding is so bad?

Post by jodokus31 »

You should check, if there is a topic in ideas & suggestions. Probably something for the extension

Unfriendly ranting doesn't motivate the devs to change anything.
Porter65
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Mar 06, 2016 10:32 pm
Contact:

Re: Why pathfinding is so bad?

Post by Porter65 »

I'm not unfriendly to the devs. I would even understand if they decided that pathfinding is good enough. Color me instead surprised. We are talking of a team of devs who put thousands upon thousands of hours into a finely tuned game, but somehow the pathfinding is not making justice to it, and is not at the level you would expect from the rest. I have trouble believing that these guys can't have a pathfinding that, with optimizations at several levels as they do, could not be better while not using too many CPU cycles.

Edit: I did not put it in the suggestion forum because I'm pretty sure that since the 6+years of development of Factorio, the subject came tons of time and the devs are aware of the issue. I was just throwing a discussion to know the reason why it is not an area of attention from them.

At this stage, it means that it will remains as is ... Or it would have been improved a long time ago.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Why pathfinding is so bad?

Post by Hannu »

Porter65 wrote: Tue Mar 16, 2021 2:01 pm I'm not unfriendly to the devs. I would even understand if they decided that pathfinding is good enough. Color me instead surprised. We are talking of a team of devs who put thousands upon thousands of hours into a finely tuned game, but somehow the pathfinding is not making justice to it, and is not at the level you would expect from the rest. I have trouble believing that these guys can't have a pathfinding that, with optimizations at several levels as they do, could not be better while not using too many CPU cycles.
Everything could be better but there is always limited time resources and many opinions which is the most important thing to improve. I agree with you, biters are ridiculous and construction bots are weak, which costs the resource which is for me the most expensive, my playing time. But I understand the decision to prefer megabases. Insanely huge megabases in youtube have certainly better marketing value for the game than clever biters or efficient robots, even very small part of players ever build such system.
astroshak
Filter Inserter
Filter Inserter
Posts: 639
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: Why pathfinding is so bad?

Post by astroshak »

The decision was made early on to not make this a real time strategy game. Biters used to be necessary for science, dropping Alien Artifacts that you needed for research. Those got taken out and we got several new colors of science instead.

Point being, they only want the biters to provide some defensive pressure to the player, to represent a military resource sink, nothing more. Biter AI, while lackluster when applied to AAI Vehicles, is sufficient (and probably fairly optimized given the intent) for that purpose.

Would making the game more of a RTS be of any benefit? I’d guess (and it’s only a guess) that it would come out a wash, that as many people would like the change as would dislike it. So why would the devs make a change like that?
quyxkh
Smart Inserter
Smart Inserter
Posts: 1031
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Why pathfinding is so bad?

Post by quyxkh »

Porter65 wrote: Tue Mar 16, 2021 10:14 am Biters have constant issues, stuck against cliffs. That's part of the vanilla experience. It does not feel that illegitimate to ask for a better pathfinding, if only for Biters.
They've got this game using every scrap of memory bandwidth available. Buff the RTS depth means nerf the logistics depth and there's already tons of excellent RTS's out there. If you want to buff the biter challenge anyway, install Rampant. But that will distract from Factorio's strengths, if you want an RTS play an RTS. Get Rise of Nations (don't even try the online community until you can walk all over all the toughest AIs one-on-one on a tight map), or if you have time and want to get schooled by a damn machine play AI War on the higher levels. Falling for an AI's trap *twice* is not an experience you'll soon forget. That game is tunable to an utterly insane degree, you could get lost. Just start at maybe 7/7 easier ai's no dlc/expansions and incrementally tweak from there.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Why pathfinding is so bad?

Post by Oxyd »

Porter65 wrote: Tue Mar 16, 2021 10:14 amBiters have constant issues, stuck against cliffs. That's part of the vanilla experience. It does not feel that illegitimate to ask for a better pathfinding, if only for Biters.
Biters tend to get stuck on cliffs and trees because something (usually another biter) pushes them off the optimal path and the biter then tries to get itself back on track without necessarily bothering the pathfinder. “Better pathfinding” wouldn't really help, except maybe to find a path that doesn't bring them so close to trees or cliffs, which would reduce the chances of them getting stuck.

Unit movement is kinda crap, but it's always been low enough priority for it to stay crap. Maybe one day it will be less crap. No promises, though.
Porter65
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Mar 06, 2016 10:32 pm
Contact:

Re: Why pathfinding is so bad?

Post by Porter65 »

Thanks & Fair enough Oxyd!
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Why pathfinding is so bad?

Post by eradicator »

Imho the RTS comparison doesn't really work because for those path-finding is a central game mechanic. Also a) RTS games have smaller maps, b) with fewer obstacles (factorio has trees+rocks all over the place) and c) RTS games can use pre-calculated (or even manually added!) paths stored in the map data becaue the maps never change, allowing them to pre-pay the CPU cost. d) And then they usually have fewer units moving at once (compared to a huge factory getting attacked on all sides). And lastly e) RTS games don't need to simulate much else (just think about the number of assemblers vs. the number of unit-production buildings).

(Not saying it can't be done. Saying that the premise is different.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Xeorm
Fast Inserter
Fast Inserter
Posts: 206
Joined: Wed May 28, 2014 7:11 pm
Contact:

Re: Why pathfinding is so bad?

Post by Xeorm »

I've played a lot of RTS games in my life, and I can't think of any of them where I really loved their pathfinding and thought they did a perfect job. There were a few that were particularly bad, like some of the older ones or Achron, but in general they're at least decent. And Factorio's pathfinding I'd label decent rather than bad. It mostly gets biters to where they should be, and does a decent job of making them not derp around noticeably. You'll get times where they're super stupid, but those usually involve cliffs or odd scenarios and I'm ok with that personally.
Trific
Fast Inserter
Fast Inserter
Posts: 155
Joined: Thu Dec 31, 2020 7:57 pm
Contact:

Re: Why pathfinding is so bad?

Post by Trific »

In the real world, animals that evolved on flat, largely featureless plains have difficulty with pathfinding to a strong draw around obstacles like a fence even when they are familiar with both sides and have been lead from one side to the other many times. Since the biters live on such a world, it shouldn't be surprising that their pathfinding abilities are not the greatest.
Post Reply

Return to “General discussion”