Thoughts about optimizing bot assignments that can't be fulfilled

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
alercah
Fast Inserter
Fast Inserter
Posts: 151
Joined: Sun Apr 07, 2019 5:19 am
Contact:

Thoughts about optimizing bot assignments that can't be fulfilled

Post by alercah »

In FFF 256, you mentioned that all the ghosts are put into a list and new orders are processed effectively in order, with only a small number being checked each tick. This can result in slowdown processing large blueprints as well as bot orders effectively getting 'stuck' behind uncompleteable orders.

For uncompleteable orders, maybe this could be optimized by indexing the ghosts by tile type and logistic network, and when a given network doesn't have any supplies available of a given type, it then can skip over all of them. This wouldn't affect the build order of prints where they are all completeable, but it would prevent orders from getting stuck behind ones that can't be fulfilled. Then each tick they could be revisited only if something has changed to allow the orders to be fulfilled again.

I don't know enough about the code to know if it's actually a win, but figured it would be worth mentioning.

EDIT: The other thing that comes to mind is just curiosity about which data structure is used, and whether there might be one that can provide better overall performance.

Post Reply

Return to “Ideas and Suggestions”