Your suggestion of not perfect
Here's a setup.
- Ghosts.png (832.54 KiB) Viewed 6386 times
Player is at the blue stick figure, not moving and let's assume that full complement of bots and no items to do the ghosts, Some how the list was created such that the numbers represent the order of items in the list, happy so far?
Tick 1: Solar panel arrives, check heap, check list, not issued because list is looking at an accumulator
Tick 2: Nothing arrives, check heap, check list, Player has Solar Panel but not issued because list is looking at an accumulator
Tick 3: Solar Panel Arrives, check heap, check list, Player has Solar Panel but not issued because list is looking at an accumulator
Tick 4: Accumulator Arrives, check heap, check list, Accumulator issued to item 4 because it's in the list next and not 10 or 38 which are closer to the player
Tick 5-10: Nothing arrives, check heap, check list, Player has 2 Solar Panels but not issued because list is looking at an accumulator
Tick 11: Nothing arrives, check heap, check list, Solar panel is issued to item 11 because it's the next in the list and not 16 or 23 which are closer
11 ticks so far 2 operations per tick for 1-11 and 2 jobs issued, and 2 sorts on empty heap attempted
How it works now same set up
Tick 1: accumulator looks for bot to do it, player no item
Tick 2: accumulator looks for bot to do it, player no item
Tick 3: accumulator looks for bot to do it, player no item
Tick 4: accumulator looks for bot to do it, player has accumulator and is in range, player deploys bot
Tick 5-10: accumulator looks for bot to do it, player no item
Tick 11: Solar panel looks for bot to do it, player has solar panel and is in range, player deploys bot
11 ticks 1 operation per tick exactly the same jobs done.
That's 2 item types and 1 player is twice as many operations, add a second player:
- Ghosts.png (756.27 KiB) Viewed 6386 times
Tick 1: Player 1: Solar panel arrives, check heap, check list, not issued because list is looking at an accumulator
Tick 1: Player 2: Nothing arrives, check heap, check list, Do nothing
Tick 2: Player 1: Nothing arrives, check heap, check list, Player has Solar Panel but not issued because list is looking at an accumulator
Tick 2: Player 2: Nothing arrives, check heap, check list, Do nothing
Tick 3: Player 1: Solar Panel Arrives, check heap, check list, Player has Solar Panel but not issued because list is looking at an accumulator
Tick 3: Player 2: Nothing arrives, check heap, check list, Do nothing
Tick 4: Player 1: Accumulator Arrives, check heap, check list, Accumulator issued to item 4 because it's in the list next and not 10 or 38 which are closer to the player
Tick 4: Player 2: Nothing arrives, check heap, check list, Do nothing
Tick 5-10: Player 1: Nothing arrives, check heap, check list, Player has 2 Solar Panels but not issued because list is looking at an accumulator
Tick 5-10: Player 2: Nothing arrives, check heap, check list, Do nothing
Tick 11: Player 1: Nothing arrives, check heap, check list, Solar panel is issued to item 11 because it's the next in the list and not 16 or 23 which are closer
Tick 11: Player 2: Nothing arrives, check heap, check list, Do nothing
How it works now same set up
Tick 1: accumulator looks for bot to do it, player no item
Tick 2: accumulator looks for bot to do it, player no item
Tick 3: accumulator looks for bot to do it, player no item
Tick 4: accumulator looks for bot to do it, player 1 has accumulator and is in range, player deploys bot
Tick 5-10: accumulator looks for bot to do it, player no item
Tick 11: Solar panel looks for bot to do it, player 1 has solar panel and is in range, player deploys bot
That's 2 times the QOL produces the same output as the way it works now with more computation
Let's take the example of the player having all the items then?
- Ghosts.png (832.54 KiB) Viewed 6386 times
Assuming the Heap is sorted
Tick 1: check heap, issue accumulator 10, sort heap O(Log2(42)), check list
Tick 2: check heap, issue accumulator 38, sort heap O(Log2(41)), check list
Tick 3: check heap, issue accumulator 9, sort heap O(Log2(40)), check list
Tick 4: check heap, issue accumulator 39, sort heap O(Log2(39)), check list
Tick 5: check heap, solar panel 16, sort heap O(Log2(38)), check list
Tick 6: check heap, solar panel 23, sort heap O(Log2(37)), check list
Tick 7: check heap, issue accumulator 8, sort heap O(Log2(36)), check list
Tick 8: check heap, issue accumulator 40, sort heap O(Log2(35)), check list
Tick 9: check heap, solar panel 22, sort heap O(Log2(34)), check list
Tick 10: check heap, issue accumulator 7, sort heap O(Log2(33)), check list
...
Tick 43: check heap, issue solar panel 31, sort heap O(log2(0)), check list
Tick 44: check heap, check list
44 ticks 44 items issued 42 sorts performed to sorted data (that would certainly have been needed if the player had been moving or had recently moved (in the last 20 seconds)) none of which were necessary because all would be launched regardless of order before bots ran out.
How it works now same set up
Tick 1: accumulator 1 looks for bot to do it, player has accumulator and is in range, player deploys bot
Tick 2: accumulator 2 looks for bot to do it, player has accumulator and is in range, player deploys bot
Tick 3: accumulator 3 looks for bot to do it, player has accumulator and is in range, player deploys bot
...
Tick 43: accumulator 43 looks for bot to do it, player has accumulator and is in range, player deploys bot
Tick 44: nothing in list no action
44 ticks 44 operations. 3rd time same result of QOL has no benefit and more computation.
Player moving? that adds surface scan
Moving while having items? would require me to actually show the stepwise sorting process for the heap but it does not look good for the QOL
No items at all? well that's just something that takes more operations taking more operations without a state change
More than 2 types of ghosts? amplifies the delivery problem
Construction and deconstruction at the same time? there are positions where the bots will be placing down items but can't because trees or other items haven't been moved first based on distance rather than 'random'
2 players with enough items? that's the first one where deployment might be faster for the QOL than the current solution, but it takes more than 4 times the processing and because you waste ticks dealing with conflicts rather than issuing orders you only save 4/5 ticks in deployment total (in this case) vs the current solution
And so on, the idea just doesn't add the QOL you think it does with only the computation you're offering it, and if you offer it more it's just not feasible.