Logistic Robot Efficiency

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
Walsy
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Jun 23, 2016 1:16 am
Contact:

Logistic Robot Efficiency

Post by Walsy »

Hi guys, I've noticed that the logistic slots on the player are not as efficient as they could be; a single robot is sent with an item that you're lacking in your logistic slots and then returns to the roboport with nothing while a second robot is sent with nothing to the player to pick up a "trash" item and put it wherever it's needed. This is wasteful because it takes 2 robots taking a single trip each (so 2 trips) to do what can be done with a single robot and trip.

TL, DR; I propose that robots assigned to satisfy the player's logistic slots brings an item that's lacking and takes away a trash item with it when it leaves. Optionally, this could be an additional research upgrade, much like the logistic slots themselves (I'd call it "logistical efficiency" or something along those lines).

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

Re: Logistic Robot Efficiency

Post by ssilk »

Well, I would like that too, but how do you want to calculate that?

I mean: Robot 1 flies to player to pick up something. Some milliseconds later Robot 2 is sent to the player to bring him something. But first he needs to pick up the item he needs, then he flies to the player.

How do you want to manage, that Robot 2 comes there, before Robot 1 is there?
See?

It's much more efficient to send two bots, cause you cannot know, when both will arrive.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Walsy
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Jun 23, 2016 1:16 am
Contact:

Re: Logistic Robot Efficiency

Post by Walsy »

ssilk wrote:Well, I would like that too, but how do you want to calculate that?

I mean: Robot 1 flies to player to pick up something. Some milliseconds later Robot 2 is sent to the player to bring him something. But first he needs to pick up the item he needs, then he flies to the player.

How do you want to manage, that Robot 2 comes there, before Robot 1 is there?
See?

It's much more efficient to send two bots, cause you cannot know, when both will arrive.
It should be possible for the robot to check if there is anything in the player's trash slot before it leaves; if there is, it picks it up and if there isn't, it goes back to port. The only time the robots should act as they do now, is if there's nothing in the trash slots or everything in the logistic slots are satisfied

TheSkiGeek
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Jun 16, 2016 5:00 am
Contact:

Re: Logistic Robot Efficiency

Post by TheSkiGeek »

Walsy wrote:
ssilk wrote:Well, I would like that too, but how do you want to calculate that?

I mean: Robot 1 flies to player to pick up something. Some milliseconds later Robot 2 is sent to the player to bring him something. But first he needs to pick up the item he needs, then he flies to the player.

How do you want to manage, that Robot 2 comes there, before Robot 1 is there?
See?

It's much more efficient to send two bots, cause you cannot know, when both will arrive.
It should be possible for the robot to check if there is anything in the player's trash slot before it leaves; if there is, it picks it up and if there isn't, it goes back to port. The only time the robots should act as they do now, is if there's nothing in the trash slots or everything in the logistic slots are satisfied
This is harder than it sounds, because you suddenly have to queue tasks for robots (in your example, the game would have to decide up front that one bot can both bring an item to you and carry something else away), AND other bots' scheduling would need to respect that (you wouldn't want it to send a second bot to pick up the trash if the first one is already going to handle it).

I'm guessing that would make the robot-job-assigning code quite a bit more CPU-intensive.

Perhaps, as you suggested, it could try to "steal" work opportunistically, but not schedule it intelligently like that up front. That would be a lot cheaper to check, since it doesn't scale with the number of total bots in the system.

Walsy
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Jun 23, 2016 1:16 am
Contact:

Re: Logistic Robot Efficiency

Post by Walsy »

TheSkiGeek wrote:
Walsy wrote:
ssilk wrote:Well, I would like that too, but how do you want to calculate that?

I mean: Robot 1 flies to player to pick up something. Some milliseconds later Robot 2 is sent to the player to bring him something. But first he needs to pick up the item he needs, then he flies to the player.

How do you want to manage, that Robot 2 comes there, before Robot 1 is there?
See?

It's much more efficient to send two bots, cause you cannot know, when both will arrive.
It should be possible for the robot to check if there is anything in the player's trash slot before it leaves; if there is, it picks it up and if there isn't, it goes back to port. The only time the robots should act as they do now, is if there's nothing in the trash slots or everything in the logistic slots are satisfied
This is harder than it sounds, because you suddenly have to queue tasks for robots (in your example, the game would have to decide up front that one bot can both bring an item to you and carry something else away), AND other bots' scheduling would need to respect that (you wouldn't want it to send a second bot to pick up the trash if the first one is already going to handle it).

I'm guessing that would make the robot-job-assigning code quite a bit more CPU-intensive.

Perhaps, as you suggested, it could try to "steal" work opportunistically, but not schedule it intelligently like that up front. That would be a lot cheaper to check, since it doesn't scale with the number of total bots in the system.
That is a very good point, and I'll admit that my proposed method would probably require the coding behind their behaviour to be rewritten. The inefficiency isn't really a factor in late-game factories which have excessive logistic bots to spare. However for my mid-game factories with a few hundred robots in the system, I never seem to collect what I'm asking for in my logistic slots and my trash slots rarely empty, even when I have requests for my "trash" items. It seems like robots rarely get assigned to the player's logistics. I believe there should be some way to improve this without the brute force effect of building thousands of logistic robots or maxing out the entire research tree to make them effective.

As the robots work now, any of them tasked with giving something to the player or taking something from his trash slots could be considered to be delegated to the player's logistic system and separate from the main logistic system until the player moves out of range or his logistics are satisfied. Their first task would be to judge if the player needs anything. Things that bots are getting to the player could be included in the assessment so you don't have 5 bots trying to bring that last battery needed. Once they get to the player and drop off the item, they take something from the trash slots and deal with it. Before returning to the main system, they would check to see if the player's logistics are satisfied. Rinse and repeat :)

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

Re: Logistic Robot Efficiency

Post by mattj256 »

TheSkiGeek wrote:Perhaps, as you suggested, it could try to "steal" work opportunistically, but not schedule it intelligently like that up front. That would be a lot cheaper to check, since it doesn't scale with the number of total bots in the system.
Yes, I like this suggestion because it seems like a good compromise.

When a bot leaves the player's logistic trash slot completely empty you'd still have to either cancel robot task(s) or accept the overhead of robot(s) making a useless trip. I'd rather have this behavior than the current behavior.

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

Re: Logistic Robot Efficiency

Post by ssilk »

Walsy wrote:It should be possible for the robot to check if there is anything in the player's trash slot before it leaves;
This is already done. The problem is: if you have enough free robots, it is quite unlikely, that a robot finishes his job, when directly below him a new job appears.
That way all jobs are given to bots more far away.

I played around with the number of free bots, cause if you have too much free, they are at points far away.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

TheSkiGeek
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Jun 16, 2016 5:00 am
Contact:

Re: Logistic Robot Efficiency

Post by TheSkiGeek »

ssilk wrote:
Walsy wrote:It should be possible for the robot to check if there is anything in the player's trash slot before it leaves;
This is already done. The problem is: if you have enough free robots, it is quite unlikely, that a robot finishes his job, when directly below him a new job appears.
That way all jobs are given to bots more far away.

I played around with the number of free bots, cause if you have too much free, they are at points far away.
I think the suggestion is something like:

When a logistic bot (call this bot A) drops something in the player's inventory, check if there are any bots in flight trying to take items away from the player (call this bot B). If there are, switch the trash removal job from bot B to bot A and make bot B idle again.

Edit: in theory you could do this for all sorts of jobs, but I don't know if you could manage and find the jobs efficiently. But it would be nice to optimize this for the player's inventory.

Post Reply

Return to “Ideas and Suggestions”