Yes, such algorithm can be created, but there are still a corner cases, e.g.:
There are 3 buildings X where one is missing a specific worker W.
There is 1 building Y where there is worker W working on lower position.
Is it good strategy to expel worker W from Y and perhaps stop production in Y
(only building of this type) for long time?
Your team Widelands Developers is subscribed to branch
Mailing list: https://launchpad.net/~widelands-dev
Post to : email@example.com
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp