Warning: math inbound. For those of you who don't care about such things, you might want to skip this post.
I was thinking about that problem within the context of the AE. I did not find a viable way to do that. In principle though I think it is a potentially good idea, but the question is how to define "diversity" in a mathematically rigorous manner that a game engine could implement.
It is indeed the question, and I've been thinking about it somewhat over the last day. Specifically, attacking the problem of measuring diversity of damage types in a group of enemies as a place to start, since that is what got me thinking about the larger issue in the first place. These are initial thoughts and I'm sure implementing it would require testing and adjustments--not to mention a game, I suppose, but it's an interesting mental exercise regardless. So, imagine we have a group of enemies built by a developer or a player in AE. To make the issue a little simpler for now, we'll suppose we're only concerned with minions (handling other ranks could come later), and I'll ignore some corner case possibilities such as minions that produce 0 damage. What do we do next?
Step 1: Find damage vectors for each enemy. We'll define a damage vector as a vector with 8 components (one for each main damage type). It represents the average DPS that the enemy or group of enemies deal for each of the 8 damage types. So, if a minion deals on average 10 DPS of damage type 1 and 5 DPS of type 6, then the vector is [10,0,0,0,0,5,0,0]. I'm glossing over this part a bit, as I realize coming up with an accurate picture may not be the easiest thing in the world--it depends not only on powers available to the enemy, but also AI factors and so on. However, I believe this is something that could be dealt with to a sufficient degree of accuracy for the remaining steps.
These damage vectors can have only nonnegative components. They follow the expected rules for addition by components and scalar multiplication. Magnitude is best determined by the Taxicab norm (the sum of the components), as that will produce the total DPS of the enemy irrespective of damage type.
Step 2: Determine diversity of a damage vector. Let's first define the function we'll use to determine this. We'll convert the damage vector D into one that represents the damage by type as a proportion of total DPS, called D', by dividing each component by the magnitude of the vector ||D||. Note that the sum of the components of this new vector is always 1. We can take the Euclidean norm of this vector (square root of the sum of the squares) to get its length, but we must note that this tends to give larger lengths the fewer damage types are present, so we'll take the reciprocal. Due to the structure of the vector used and the number of components, this will produce a number between 1 and 2root2, so we'll take the logarithm base 2root2. Like so:
D' = (1/||D||) [d
1,...,d
8]
Diversity of D = log
2root2 (d'
12 + ... + d'
82)
-0.5 What this produces is a number between 0 and 1, for which 0 represents no diversity (all damage of one type) and 1 represents perfect diversity (equal damage of each type). It increases fairly quickly at first by introducing 2nd and 3rd damage types of significant amounts onto the 1st, which I think is what we would like this measure to accomplish.
Using this function, we could get a sense of the diversity of damage types in a group of enemies by looking at the average of the damage vectors for its members.
(While we're at it, we may as well note the expected DPS of the average enemy also. I'll come back to this later.)
Step 3: Account for individual variation. One aspect that has been touched on briefly in conversation is that how diversity is distributed among the minions may be relevant. For example, if you have two minions, one of which deals damage type 1 and the other which deals an equal amount of type 2, then you have the opportunity to focus fire one of the minions down and reduce the remaining damage types to just one. If however, you face two minions that each deal half damage of type 1 and half of type 2, then you don't have such an opportunity. However, our measure of diversity above does not account for this difference, since the "average" minion is the same in each case. Thus, it would be good to measure each minion's contribution to diversity and the benefit to the player of focus firing it down.
Since our baseline assumption is that a particular spawn consists of three minions, let's start there. For each minion A that can spawn for the group, we will construct a spawn of minions consisting of A and two others (which may or may not be of the same type). If there are n members of the group, there are n(n+1)/2 possible such distinct spawns. We find the total damage vector for the spawn both with and without A. We can then use the diversity function on each vector and take the difference to find the change in diversity from defeating that minion. For each minion, take the average of these values across each possible spawn.
What we get then is a measure for each minion of how much you will reduce (or increase) the damage diversity if you remove it first from a spawn of three.
(Again, while we're at it, we may as well take the average portion of the spawn's damage the minion represents.)
Step 4: What to do with these numbers? We've now collected data on two things: the diversity of the group of enemies in general, and the benefit for each minion type that the player sees in reduced damage, both in terms of total damage and the diversity of that damage. Deciding how to use this is an open question. It depends how much you decide they matter. But as a place to start, you might determine how much damage diversity a "typical" group should have, and apply xp bonuses or penalties when above or below that value. We also have a way to identify minions that represent greater threats. If for example a minion represents a greater portion of the damage potential compared to the average and offers a diverse selection of damage types in a group that otherwise consists of very few, that can be accounted for. It might make sense to combine these measurements with others to determine the "focus fire factor" of minions first though, as we all know damage isn't always the main concern in picking your first target. *cough* Sappers *cough cough*
This lays some potential groundwork for the theory. I tried some numbers in a spreadsheet, taking the measures mentioned for a group of 4 minions, and the results were fairly promising. It produces numbers that intuitively feel to be useful measurements in a relative sense. There are a fair number of calculations involved, though that is effectively irrelevant as they only have to be done once.