I'd argue that MapReduce is the wrong model here. In MapReduce, you are dealing with data, which you can replicate easily across sites. This is untrue for physical items, which Factorio simulates.ssilk wrote:I want to bring in another aspect into this discussion. It's maybe a bit hard to understand.
The problems we are facing here are very similar to problems managing large amounts of data, parallelization and especially comparable to the mapReduce model...
If you see the problem as map/reduce ( https://en.wikipedia.org/wiki/MapReduce ), then the operations for Factorio are:
- splitting up the tasks (place one item) on different robots
- the "reduce"-operation is to complete those tasks. For example to travel to point A, pick up an item, travel to point B, place an item.
When you look on, how really big machines do this task, then we need to think about the problem: What happens, if one bot fails. It could be something, perhaps I've take it accidentially taken down one bot. Perhaps some biter has eaten it.
Because of that most of such systems do actively create more reduce jobs, than they need, just for the case, that some node has break down meanwhile. Because there is a problem: If you do just exact so much reduce jobs, as you have tasks, and one of the reducers fail short before he has finished, then the whole queue needs to wait for this single task, which - in the end - double the total calculation-time.
What does this mean for our game?
Also, the task is already heavily parallelized by assigning one robot per concrete tile.
But while I think the model is wrong, the conclusions you draw are in the right direction.
Not really a thing that needs to be decided on the game-balancing side. The player can already bring the items closer to the task. Although some logistics-construction-interplay would be nice as in: logistics bots carry the items to the closest provider chest from which construction robots pick up the items (much like a broadcast model).ssilk wrote: - Reducing distances. Bring the items nearer to the targets (some ideas mentioned here). But also better ways to recharge (a flying recharger?), more intelligent pathfinding.
- More intelligent ways to spread items over the area (bring the stuff to the place, BEFORE it is needed); repair kits is most wanted, but the same is true for other stuff. More ways to split the robot-network (https://forums.factorio.com/forum/vie ... =67&t=8905)
I vote against that. Ghosts remain until built, so there is no real impact of losing a bot.ssilk wrote: - make the bots more reliable: Say for every 10 or 20th item they bring one more to the area, for the case, that one bot got lost. If the bot which brings it is too far away then it will be replaced with the one, which is more near.
I agree, and I see some quick wins here. An easy, first fix would be to compare total flight time, when assigning a task to a robot. That does of course mean that you'd have to order the list of robots for each task anew.ssilk wrote: - make the bots more intelligent: There should be a "working queue" for each bot with his estimated duration. If it is faster to add a task to a bot, which is at that time closer to the target than a free one, that is far away, why should the distant bot do it?