Personal robots prioritizing nearest first

Post your ideas and suggestions how to improve the game.
Post Reply
Koub
Global Moderator
Global Moderator
Posts: 4333
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Personal robots prioritizing nearest first

Post by Koub » Fri May 18, 2018 10:13 pm

[Koub] Merged into older topic with same suggestion
Koub - Please consider English is not my native language.

CzBuCHi
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Feb 22, 2018 10:25 pm
Contact:

Construction bots non-random item placing

Post by CzBuCHi » Thu Aug 09, 2018 8:19 pm

What ?
Make construction bots place items not randomly all over the blueprint but only when there is already placed item or player nearby....
Why ?
Currently after placing smelter BP and having only few bots, it takes really long time before smelter can produce anyting because bots are spraying items all over the place ...

TL/DR:

Imagine, that attached image represents game world at 4 stages of build ...
- green square: chest with all nesseseary items and roboport
- blue rectangle: ghost of smelting arrays
- orange lines: connection to outer world (power, belts, ...)
- black pixels: placed items

on upper site u can see current progress of bots building ... no smelting until bots decide to place items at beginning of array (may take a while ...)
on lower site u can see my proposal how bots should build ... smelting can start really soon because array is builded from begining to end

PS: Sorry if this was already suggested, but i didnt find it ...
Attachments
CrazyPictura.png
CrazyPictura.png (7.79 KiB) Viewed 636 times

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

Re: Personal robots prioritizing nearest first

Post by Koub » Thu Aug 09, 2018 10:04 pm

[Koub] Merged into older thread with same or similar suggestion.
Koub - Please consider English is not my native language.

bobucles
Smart Inserter
Smart Inserter
Posts: 1510
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by bobucles » Fri Aug 10, 2018 2:11 pm

Shrinking the construction zone size of personal roboports is a huge buff to their functionality for this very reason.

mrvn
Smart Inserter
Smart Inserter
Posts: 2856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Personal robots prioritizing nearest first

Post by mrvn » Mon Aug 13, 2018 8:50 am

bobucles wrote:Shrinking the construction zone size of personal roboports is a huge buff to their functionality for this very reason.
How do you shrink the construction zone size?

thedarkbunny
Inserter
Inserter
Posts: 46
Joined: Mon Oct 23, 2017 10:46 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by thedarkbunny » Mon Aug 13, 2018 10:29 am

mrvn wrote:How do you shrink the construction zone size?
Mods, generally.

mrvn
Smart Inserter
Smart Inserter
Posts: 2856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Personal robots prioritizing nearest first

Post by mrvn » Mon Aug 13, 2018 12:13 pm

thedarkbunny wrote:
mrvn wrote:How do you shrink the construction zone size?
Mods, generally.
Any pointers to the API to use?

bobucles
Smart Inserter
Smart Inserter
Posts: 1510
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by bobucles » Mon Aug 13, 2018 1:08 pm

Code: Select all

data.raw["roboport-equipment"]["personal-roboport-equipment"].construction_radius = 10 --down from 15
data.raw["roboport-equipment"]["personal-roboport-mk2-equipment"].construction_radius = 15 --down from 20	
It's a very simple QOL roboport buff.

mrvn
Smart Inserter
Smart Inserter
Posts: 2856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Personal robots prioritizing nearest first

Post by mrvn » Mon Aug 13, 2018 1:50 pm

bobucles wrote:

Code: Select all

data.raw["roboport-equipment"]["personal-roboport-equipment"].construction_radius = 10 --down from 15
data.raw["roboport-equipment"]["personal-roboport-mk2-equipment"].construction_radius = 15 --down from 20	
It's a very simple QOL roboport buff.
Args. That's not what I mend. That simply makes smaller roboport range. I want to shrink or grow it as needed. E.g. enter a train, shrink it to 1. Leave a train, grow it by one each tick till max.

orzelek
Smart Inserter
Smart Inserter
Posts: 3445
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Personal robots prioritizing nearest first

Post by orzelek » Mon Aug 13, 2018 4:53 pm

mrvn wrote:
bobucles wrote:

Code: Select all

data.raw["roboport-equipment"]["personal-roboport-equipment"].construction_radius = 10 --down from 15
data.raw["roboport-equipment"]["personal-roboport-mk2-equipment"].construction_radius = 15 --down from 20	
It's a very simple QOL roboport buff.
Args. That's not what I mend. That simply makes smaller roboport range. I want to shrink or grow it as needed. E.g. enter a train, shrink it to 1. Leave a train, grow it by one each tick till max.
With how game currently works you would need to dynamically replace equipment in grid I think since those parameters can't be modified in runtime.

mrvn
Smart Inserter
Smart Inserter
Posts: 2856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Personal robots prioritizing nearest first

Post by mrvn » Mon Aug 20, 2018 10:13 am

orzelek wrote:
mrvn wrote:
bobucles wrote:

Code: Select all

data.raw["roboport-equipment"]["personal-roboport-equipment"].construction_radius = 10 --down from 15
data.raw["roboport-equipment"]["personal-roboport-mk2-equipment"].construction_radius = 15 --down from 20	
It's a very simple QOL roboport buff.
Args. That's not what I mend. That simply makes smaller roboport range. I want to shrink or grow it as needed. E.g. enter a train, shrink it to 1. Leave a train, grow it by one each tick till max.
With how game currently works you would need to dynamically replace equipment in grid I think since those parameters can't be modified in runtime.
Which then I think drains the battery. Or can you set the battery level back to what it was when removing the roboport from LUA?

Darinth
Fast Inserter
Fast Inserter
Posts: 215
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by Darinth » Mon Mar 04, 2019 3:29 pm

My apologies on being late to the party and thread necromancy. I know thread necromancy is generally prefered to entirely new topics, but it always feels weird.

What about utilizing the client to provide hints to the server? I don't know how this optimization would work in single player (I don't know if factorio always runs an internal server, and SP simply connects to it like many games that support both SP and MP or if it's go some other methodology). If the client were to analyze it's surroundings via iterating the chunks, find the closest entity to construction and it sent the server an entity a tick while it's got construction robots available as a hint to 'check this entity for construction via my player roboport' the server could check it, and effectively the server has had the effort of constructing the closest entity by player roboports offloaded. Wouldn't solve roboports not constructing nearest entities first, but I wasn't ever really bothered by roboports not constructing their closest entities first. I did tend to get annoyed by watching my personal robots fly off into the wild blue yonder when there were things to (de)construct right next to me.

mrvn
Smart Inserter
Smart Inserter
Posts: 2856
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Personal robots prioritizing nearest first

Post by mrvn » Tue Mar 05, 2019 2:59 pm

Darinth wrote:
Mon Mar 04, 2019 3:29 pm
My apologies on being late to the party and thread necromancy. I know thread necromancy is generally prefered to entirely new topics, but it always feels weird.

What about utilizing the client to provide hints to the server? I don't know how this optimization would work in single player (I don't know if factorio always runs an internal server, and SP simply connects to it like many games that support both SP and MP or if it's go some other methodology). If the client were to analyze it's surroundings via iterating the chunks, find the closest entity to construction and it sent the server an entity a tick while it's got construction robots available as a hint to 'check this entity for construction via my player roboport' the server could check it, and effectively the server has had the effort of constructing the closest entity by player roboports offloaded. Wouldn't solve roboports not constructing nearest entities first, but I wasn't ever really bothered by roboports not constructing their closest entities first. I did tend to get annoyed by watching my personal robots fly off into the wild blue yonder when there were things to (de)construct right next to me.
Every client (and sever) computes everything bit identical. So if your client checks your roboport then every other player in multiplayer and the headless server has to check your roboport too. And that means you have to check everyone else roboport as well. So everyone checks everything.

Even if you change that so only you check your own roboport then everyone else would still have to wait for you to do so ot you get dropped from the game when you are to slow to keep up.

Darinth
Fast Inserter
Fast Inserter
Posts: 215
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by Darinth » Tue Mar 05, 2019 3:10 pm

That's right. I forgot that factorio utilizes a system that basically syncs the ticks between all of the players and servers, which makes perfect sense given the amount of data that would probably otherwise have to pass through the network connection. Bleh. I want there to be a solution to this problem, it bothers me every time I see bots from my personal roboport acting dumb. *_*

User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 257
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by Philip017 » Tue Mar 05, 2019 11:22 pm

i know there are lot of brilliant programmers for you lot out there and with factorio becoming even more multi threaded, i dont see why personal robots cant have their own thread or for that matter every logistics zone have it's own thread. it may require someone with the access and ability to rewrite some or all of the robot logic but i know it can be done. i have not read this entire thread, and i have probably commented on this before, but it would be so nice to have a working function that would do this work.

example, my personal robots do only my work, if i didn't place the blueprint, they will not help someone else build. this would not be a problem for single player games. it may require that each player have their own force, but can also be a member of another force so we can all collaborate on work. since the blueprint is mine, my robots can know where im at, if im standing still then it should be easy enough to figure out what is close and what is far, if i am standing still do close work first, if i move, then wait till i stand still again for a couple seconds, then assign work again. i do not at all mind waiting a couple seconds for the robots to figure out what to build close to me first, and this work could be sent to another thread till it's done, then let the main que know it's finished figuring out what to do. this logic would only apply to personal robots, base robots would still function the same way they do now. if my personal roboport is with in range of the ghost, has been assigned as being close to me, i have the item, and available robots (not waiting to charge), my robots will do the work, if the base robots are already assigned to that ghost they are canceled and my robot builds it instead. the base robot returns the unused item to the nearest yellow chest. i don't understand why any robot that needs to be charged is considered available to do a job, this is really apparent when you mine them when you have no more charge in your roboports.

i really love the new car/train logic so my robots dont run away while i zoom down out of range. thanks to whomever got that working so well.

thanks again, hope i haven't been too harsh, i know ya'll work hard on this

_italics_
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jan 05, 2019 3:28 pm
Contact:

Re: Personal robots prioritizing nearest first

Post by _italics_ » Tue Mar 05, 2019 11:56 pm

Try out the Closest First mod: https://mods.factorio.com/mod/ClosestFirst
You can see a little demo here: https://www.reddit.com/r/factorio/comme ... nouncement

One of these days I'll get around to making it a bit tighter, but it does the job without noticeable performance impact for me. Time profiler shows about 1/3-1/6th of Bottleneck's time.

It splits up the work over two ticks, and in multiplayer each player gets their own work-ticks. Haven't tried it myself, but I have gotten reports that it works without issues.

hypertrax99
Burner Inserter
Burner Inserter
Posts: 16
Joined: Mon Apr 24, 2017 6:21 pm
Contact:

priority list for personal robots

Post by hypertrax99 » Sat Mar 16, 2019 2:23 pm

What ?
i want a priority list for my personal robot hangar, to choose what they build first!
maybe also an option for build nearest/farest first
Why ?
because i read the pinned thread? :D
no, because i hate it when build for example a defense wall and the damn robots first build all the laser turrets and at the and the poles for the energy, really useless for me
when you build more then your robots can handle in one flight is it bad :/

maybe something like this:
zz.jpg
zz.jpg (240.34 KiB) Viewed 93 times

Darinth
Fast Inserter
Fast Inserter
Posts: 215
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: priority list for personal robots

Post by Darinth » Mon Mar 18, 2019 4:14 pm

Due to technical constraints on how the current system works, Wube has said no to robots being given priority in which things they build when. I'm hoping that some day they might be willing to change that. I actually really want robots to build things that are closest to you. :(

Sad_Brother
Fast Inserter
Fast Inserter
Posts: 116
Joined: Mon Jan 08, 2018 4:54 pm
Contact:

Re: priority list for personal robots

Post by Sad_Brother » Mon Mar 18, 2019 6:30 pm

But for now one robot can wait for space cleared from trees by other robots before building.

Why one robot cannot wait for space powered before placing power consumer?
Why one robot cannot wait for power pole can be connected to other poles before placing new?
Why construction requests cannot be sorted by some priority?

Darinth
Fast Inserter
Fast Inserter
Posts: 215
Joined: Wed Oct 17, 2018 12:17 pm
Contact:

Re: priority list for personal robots

Post by Darinth » Tue Mar 19, 2019 12:24 pm

From reading through a massive thread on the subject is that it's all additional overhead and on previous attempts to some form of priority they saw substantial performance degredation. I personally think it's doable, but I don't know the codebase well enough to actually be able to make that call. So as much as it annoys me, I'm going to have to place faith in the Wube staff that if this isn't done it's not for a lack of interest, but due to technical constraints of some kind.

Post Reply

Return to “Ideas and Suggestions”

Who is online

Users browsing this forum: jdtitans and 3 guests