Friday Facts #374 - Smarter robots

Regular reports on Factorio development.
ModernMythos
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Nov 21, 2019 7:43 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by ModernMythos »

Necronium wrote: ↑Wed Sep 06, 2023 4:35 pm it is update for base game engine that will come with 2.0
Thanks, I wanted to know when too.
Necronium
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 19, 2021 8:35 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Necronium »

ModernMythos wrote: ↑Sun Sep 10, 2023 7:20 am
Necronium wrote: ↑Wed Sep 06, 2023 4:35 pm it is update for base game engine that will come with 2.0
Thanks, I wanted to know when too.
from previous FFF

"This means, that we have something we are happy with, is pretty stable, and we don't expect any further brutal changes to come. We have a relatively stable list of tasks to be finished both for programmers and artists, which makes us confident that we can release a polished product in about a year."
Dutchtaylor
Burner Inserter
Burner Inserter
Posts: 15
Joined: Fri May 14, 2021 9:15 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Dutchtaylor »

Hi!

I am happy to see that you guys fixed allot of the issues with the robots.
Especially for the late game this has been a real problem for me.
2 Questions.
Question 1 :
Will there perhabs also be a fix for the repair of walls while the walls are on fire?
Many robots get destroyed trying to repair the walls while the flamethrower is trying to kills the bugs.
I know there is a mod for the robots to be invincible against the flamethrowers.
But that just seems a bit unrealistic.

Question 2 :
Allot of robots also get destroyd by the aliens.
For example when i make outposts connected with the main robot network of my base.
Lets say i have a double train track towards an outpost.
And the train network frome my base towards the outpost is in a L shape.
Look in the attachments for a better explanation.

A suicide mission.
Now my robots are getting destroyed because they think this is the shortest path towards their destination.
The energy runs out now they are very slow and easy targets for spitters.
Drones get destroyed and new drones pill up with the same destiny.
This forces me to expand my main base towards the new outpost or make small turrets outposts outside of my base towards the new outpost to protect the drones.

I could make the outpost network disconnected with the main base but that would be annoying since my storage base is most of the time inside my main base.
So now nothing is getting repaired or replaced when destroyed.
Most of the time i just accept the fact that they are dumb and i drive over the nests with my tank to solve the problem or place turrets which gets detsroyed with massive waves of aliens.

I am glad you guys already see that a simple line frome point A to point B can be frustrating even when the robots are not in danger but run out of energy.
I believe when i read this particulair update that there wil already be a sollution for this in the future.

Might is suggest a sollution :
Lets say traveling trough chunks of aliens is considered dangerous and the robots have to seek a safer path?
Or maybe (even better) deny robots to go outside of the green roboport zone at all cost.

Hope to hear from you guys! And thanks for this update anyway! love it.

Kind Regards,
Koert Peeters 26, Rotterdam (NL)
Attachments
Smarter Drones.jpg
Smarter Drones.jpg (35.97 KiB) Viewed 3250 times
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 338
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Hares »

Dutchtaylor wrote: ↑Mon Sep 11, 2023 11:16 am Question 2 :
Allot of robots also get destroyd by the aliens.
For example when i make outposts connected with the main robot network of my base.
Lets say i have a double train track towards an outpost.
And the train network frome my base towards the outpost is in a L shape.
Look in the attachments for a better explanation.

...

I could make the outpost network disconnected with the main base but that would be annoying since my storage base is most of the time inside my main base.
So now nothing is getting repaired or replaced when destroyed.
Most of the time i just accept the fact that they are dumb and i drive over the nests with my tank to solve the problem or place turrets which gets detsroyed with massive waves of aliens.
Since you've already established the rail network, there's a nice solution to your problem: The Supply Train.

In short, you set up the separate train and the separate station, whose only purpose is supplying remote outposts. Your main supply storage fills a cargo wagon using wagon slot filters and an inserter pulling items from a Requester Chest. On the outpost, the supply station is only active when the number of items in the logistics network is below a certain threshold. When the supply train arrives, a Filter Inserter then pulls items from the wagon based on the dynamic filters [(Required inventory - Network inventory) > 0] and puts items to either directly Roboport (in case of robots/repair packs), storage chest, or active provider chest, whatever you want/need. Thus, each station can support up to 40 item types per cargo wagon, and you can have more wagons if needed. The only downside to this solution is the fact you'll always be required to have all possible items on the wagon, instead of putting them on train by demand.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by SoShootMe »

Hares wrote: ↑Tue Sep 12, 2023 11:33 am Since you've already established the rail network, there's a nice solution to your problem: The Supply Train.
[...]
Thus, each station can support up to 40 item types per cargo wagon, and you can have more wagons if needed.
You can only load up to 24 (with long-handed inserters) or 12 (with only stack inserters) different items per wagon, assuming you want each inserter only handling a single item. One item per inserter is a simple way to avoid the need to limit inserter stack size but still ensure the inserter can't get "stuck" holding an item when the slots for that item are full, preventing another item being loaded. In practice this is not a major issue since, as you wrote, you can add another wagon.
vvv99
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Sep 12, 2023 4:39 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by vvv99 »

Of all the important QOL changes announced, I feel that "Roboport robot requests" would be a game changer. No longer do we need to wait for construction robots going/coming long distances for activities to be performed nearby.

Regards!
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 338
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Hares »

SoShootMe wrote: ↑Tue Sep 12, 2023 12:35 pm
Hares wrote: ↑Tue Sep 12, 2023 11:33 am Since you've already established the rail network, there's a nice solution to your problem: The Supply Train.
[...]
Thus, each station can support up to 40 item types per cargo wagon, and you can have more wagons if needed.
You can only load up to 24 (with long-handed inserters) or 12 (with only stack inserters) different items per wagon, assuming you want each inserter only handling a single item. One item per inserter is a simple way to avoid the need to limit inserter stack size but still ensure the inserter can't get "stuck" holding an item when the slots for that item are full, preventing another item being loaded. In practice this is not a major issue since, as you wrote, you can add another wagon.

If throughput is not an issue, you can leave only one inserter per wagon. Alternatively, you can have as many inserters per wagon as you want, as long as each gets its own unique, not-intersecting set of item types – they are not limited by 1 item type per inserter.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by SoShootMe »

Hares wrote: ↑Tue Sep 12, 2023 6:47 pm
SoShootMe wrote: ↑Tue Sep 12, 2023 12:35 pm You can only load [...]
[...]
We're talking cross-purposes :)
User avatar
FrostMonolith
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Sep 13, 2023 9:12 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by FrostMonolith »

So looking forward to this!!
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 338
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Hares »

SoShootMe wrote: ↑Tue Sep 12, 2023 9:27 pm
Hares wrote: ↑Tue Sep 12, 2023 6:47 pm
SoShootMe wrote: ↑Tue Sep 12, 2023 12:35 pm You can only load [...]
[...]
We're talking cross-purposes :)
Yeah, I speak about loading too.
There are a couple of ways to do so, the easiest is to set the limit the inserter stack size to 1.
See the images attached.
Screenshot from 2023-09-13 13-40-12.png
Screenshot from 2023-09-13 13-40-12.png (410.49 KiB) Viewed 3039 times
Screenshot from 2023-09-13 13-40-28.png
Screenshot from 2023-09-13 13-40-28.png (14 KiB) Viewed 3039 times
Otherwise, you can do some circuitry to manipulate stack size, but it's quite complicated and requires hard engineering.

P.S.
Attached blueprint for both load and unload stations for 40 items, they're pretty simple yet working (have some improvement potential).
spt28
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Sep 13, 2023 6:44 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by spt28 »

Are there any plans to add more robot events to the mod API?
User avatar
MANIkyn
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Sep 14, 2023 2:55 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by MANIkyn »

this update fixes everything i've been bitching about with bots
Kronus_Aero
Burner Inserter
Burner Inserter
Posts: 5
Joined: Fri Aug 25, 2023 12:48 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Kronus_Aero »

Oddly enough, out of all the new announcements this is the one I'm by far the most excited about. I love building gigantic bloated roboport networks covering my entire territory. I'm a very slow paced player, so my bots taking an hour to complete a build is outweighed by the convenience of being able to stamp down builds anywhere.
User avatar
Unknow0059
Fast Inserter
Fast Inserter
Posts: 101
Joined: Tue Aug 08, 2017 7:37 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Unknow0059 »

Quality of life features are my favorite, in any game.
They make the game deeper and more enjoyable, across the board.
It's the small things.
xTwisteDx
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Mar 04, 2023 12:17 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by xTwisteDx »

Can I ask, why use a spiral search pattern? I would think a flood-fill would be a bit better. Suppose that there is a search at 0,0 chunk, spiral starts on left and searches clockwise. With this pattern, if the destination is at -10,-10 then the search is much longer than had you used a flood fill search (Breadth First Search). Now in situations where it might be -1, 0, the spiral search would find the destination faster, but given a 360 area, the spiral search seems a bit ehhh not good? Here's some code I use for a game called "Screeps". Maybe it inspires.

Code: Select all

function floodFillSearch(room: Room, startPosition: RoomPosition, structure: StampType, plannedPositions?: RoomPosition[]): RoomPosition | undefined {
    const queue: Set<number> = new Set()
    queue.add(startPosition.x + startPosition.y * 50)

    for (const coord of queue) {
        const x = coord % 50
        const y = (coord - x) / 50

        if (doesStampFitAtPosition(x, y, room, structure, plannedPositions ? plannedPositions : [])) {
            return new RoomPosition(x, y, room.name)
        }

        if (y > 0) queue.add(coord - 50)
        if (x > 0) queue.add(coord - 1)
        if (y < 49) queue.add(coord + 50)
        if (x < 49) queue.add(coord + 1)
    }
    return
}
CrazyIvanTR
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Sep 22, 2023 7:30 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by CrazyIvanTR »

Peter34 wrote: ↑Fri Sep 01, 2023 11:56 am Nice, but one thing I'd like is for a toggle to have the Logi Bots distribute themselves roughly evenly through the factory, or maybe just 33% of the Logi Bots, and not on a per-chunk basis, but more like on a per-25-chunk basis or something like that, so that if they're not busy, some of them will spread out actively.
Since we will have a logistics request option for the roboports, maybe we can do this with a logic circuit of robots / roboports = logistics request on the roboport? Not sure but it seems possible.
morhp
Inserter
Inserter
Posts: 23
Joined: Sun Jun 18, 2017 10:06 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by morhp »

xTwisteDx wrote: ↑Thu Sep 21, 2023 2:21 pm Can I ask, why use a spiral search pattern?
I assume because the spiral returns an approximation of the closest target by default. It should also run faster because it doesn't need a queue.
SoShootMe
Filter Inserter
Filter Inserter
Posts: 517
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Friday Facts #374 - Smarter robots

Post by SoShootMe »

morhp wrote: ↑Fri Sep 22, 2023 10:04 am
xTwisteDx wrote: ↑Thu Sep 21, 2023 2:21 pm Can I ask, why use a spiral search pattern?
I assume because the spiral returns an approximation of the closest target by default. It should also run faster because it doesn't need a queue.
More precisely: a spiral only checks a given location after checking all nearer locations. Since the search can stop when the first check succeeds, this is guaranteed optimal in terms of average number of locations checked.

And it can be fairly easily implemented using a small, fixed amount of state (current location, direction and side length, and a counter). Perhaps some even better way I can't think of.
User avatar
ickputzdirwech
Filter Inserter
Filter Inserter
Posts: 792
Joined: Sun May 07, 2017 10:16 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by ickputzdirwech »

What I wonder about in terms of optimisation: when the game searches for the nearest available robot, does it do it in batches and continues where it found the last robot or do they always start from the beginning?
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Billgamer_856
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Sep 30, 2023 3:31 am
Contact:

Re: Friday Facts #374 - Smarter robots

Post by Billgamer_856 »

The part were the robots try to pathfind the nearest roboport to recharge should be also aplied to trains :!:
Post Reply

Return to β€œNews”