The general question is how to decide which NPC to offload a task to. Just as something to knock around (bearing in mind that Josh already has his own ideas), here's a quick concept:JoshParnell wrote:[T]he "efficiency" of task performance is influenced by certain state variables, but how do we encode that knowledge? .... To really allocate resources efficiently, one must have an understanding of this "efficiency," such that resources can be fitted to their most appropriate task.
There's an interesting question that I ran into today concerning delegation, which I call 'faith.' That is, how much do you trust that someone else can get something done?
D = E + (A * U) + (R * C)
D = delegation
E = efficiency
A = availability
U = urgency
R = reliability ("faith")
C = criticality
Efficiency is pretty much as Josh described it: a numeric assessment of how well an NPC's resources match up with the task requirements. (This gets its own calculation.)
Availability is a negative number that reflects the cost to get the NPC started on the proposed task, such as distance if there's a physical item or location involved that the NPC needs to travel to reach. This would be multiplied by the Urgency of the task -- the more urgent the task, the more the NPC's Availability matters. (Availability should be something like -9999999 for an NPC flagged as already fully dedicated to some other task.)
The NPC's Reliability (how well they've performed on similar tasks in the past) is a number from -10 to +10 (or something similarly ranging from negative to positive) that is multiplied by how important the task is. You wouldn't give a Critical job to someone you didn't know, or to someone who hadn't successfully completed that kind of task for the delegating NPC in the past.
Whichever NPC gets the numerically highest score gets the task. A task that has time value but isn't strategically important (i.e., Urgent but not Critical) would go to the closest NPC with the necessary resources, while a task that's very important but doesn't need to be completed immediately can go to the most reliable NPC regardless of his current location. And a task that's both Urgent and Critical would go to the nearest and most trusted subordinate.
There are plenty of practical questions that could affect this calculation. One is whether communication takes time over distance. If tasks can be assigned instantly to any subordinate regardless of location, delegation is a lot more efficient than if orders have to physically travel through space. In the latter case, an NPC's Availability is much more important.
Another question is how to break down goals into tasks that are appropriate for the next lower level of subordinates. You don't want to expect subordinate NPCs to do things that are your responsibility. But you also don't want to give an easy task to an experienced NPC, or a job that requires great tactical skill to an NPC who's an excellent strategist (or vice versa).
A distinction probably also needs to be made between jobs that are "atomic" and compound goals that can broken down into simpler compound goals or atomic tasks. Atomic tasks, such as "attack that ship" or "carry this general freight to Location X," are best delegated to rank-and-file subordinate NPCs. But goals that can be broken down into tasks need to be delegated to NPCs who are in the middle to higher levels of a factional hierarchy, who then break them down into new lower-complexity compound goals or (if they're the initial level of leadership) into atomic tasks.
This just sort of scratches the surface of how delegation could be implemented. Other thoughts?