Bot should choose closest box when supplying player

Suggestions that were added to the game.
Post Reply
User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Bot should choose closest box when supplying player

Post by Mithaldu »

I tried searching for previous discussion of this, but really wasn't able to find anything specific about this, and all i got on IRC was "bots ignore distances".

I suspect bots don't consider distances as a performance optimization, which would be quite sensible.

However when relying on bots to fill logistics slots, it's always really painful when entering/leaving big logistics areas, and the bots decide to really go aaaall the way across the map to bring a bunch of belts to the player, making them wait for a minute or two.

If bots in general can for some reason not be made to take distances into account, maybe there's some space for making the player logistics slots a special case where they do select the nearest chest?

Rseding91
Factorio Staff
Factorio Staff
Posts: 10788
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Bot should choose closest box when supplying player

Post by Rseding91 »

Robots already do pick the closest chest to the player when delivering items.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by Mithaldu »

I am sorry. You are entirely right. I was misinformed in IRC and had overlooked an active provider chest in my tests. (It was a little hard to find looking manually.)

Does the current code always check distance or only for player supplying?

Rseding91
Factorio Staff
Factorio Staff
Posts: 10788
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Bot should choose closest box when supplying player

Post by Rseding91 »

Mithaldu wrote:I am sorry. You are entirely right. I was misinformed in IRC and had overlooked an active provider chest in my tests. (It was a little hard to find looking manually.)

Does the current code always check distance or only for player supplying?
Always.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by Mithaldu »

Excellent, thank you. :D

raidho36
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Wed Jun 01, 2016 2:08 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by raidho36 »

Bots don't just "don't consider distance", in my experience they deliberately choose the farthest possible object they could go for that would satisfy your order. If you order to build something, they'll first build the farthest possible objects. If you order to destroy, they'll first destroy farthest possible objects.

Clearly there is a list of targets for them to pick from. Simply reversing the list will do the trick because now the closest objects are highest priority.

User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by Mithaldu »

That's construction, and if it is like that, should be a different thread. :)

Rseding91
Factorio Staff
Factorio Staff
Posts: 10788
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Bot should choose closest box when supplying player

Post by Rseding91 »

raidho36 wrote:Bots don't just "don't consider distance", in my experience they deliberately choose the farthest possible object they could go for that would satisfy your order. If you order to build something, they'll first build the farthest possible objects. If you order to destroy, they'll first destroy farthest possible objects.

Clearly there is a list of targets for them to pick from. Simply reversing the list will do the trick because now the closest objects are highest priority.
No they don't.
If you want to get ahold of me I'm almost always on Discord.

hansson
Burner Inserter
Burner Inserter
Posts: 12
Joined: Tue Jun 28, 2016 10:31 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by hansson »

Rseding91 wrote:
Mithaldu wrote:I am sorry. You are entirely right. I was misinformed in IRC and had overlooked an active provider chest in my tests. (It was a little hard to find looking manually.)

Does the current code always check distance or only for player supplying?
Always.
If this is the expected behavior, then how is this gif explained?: https://gfycat.com/HatefulUnlawfulErmine
(Credit: https://www.reddit.com/r/factorio/comme ... s/ddtc2lw/)
Clearly the closest chest to the active provider is not being chosen, is there a misunderstanding here? I would expect the storage chest closest to the active provider to be chosen, not the one further away. Or is the behavior related to distance only relevant for requester chests and player supply?

User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: Bot should choose closest box when supplying player

Post by Mithaldu »

Rseding91 was talking about the case where a bot is trying to satisfy a request for an item to be brought.

The gif is showing an item being sent away into the logistics network, which follows different rules meant to minimize chances of there being no empty slot in the network to deliver something to.

Post Reply

Return to “Implemented Suggestions”

Who is online

Users browsing this forum: No registered users