I've been toying with an idea for a game prototype where the player must defend against waves of enemies, but between each wave the enemies "evolve" to better combat whatever tactics the player is using. Essentially each enemy type has some genetic information that can be used to generate their health, speed, attack type and so on; with the more "successful" enemy types being mutated into new sub-types, while ineffective enemy types are phased out.
What I'm trying to figure out, is what is a good way of measuring "success" against the player?
EDIT: Although I don't really want to get too specific about the game mechanics, let's assume that the game world is complex enough that you cannot figure out if an enemy type will be effective against the player without testing it.
So far I've thought of two basic solutions:
Use heuristics like whether a certain enemy deals damage to the player or survives a long time without being killed.
The problem I have with this approach is that it can be exploited if (when) the player figures out how the algorithm works. For example you would be able to deliberately let the weakest enemies land a few free hits to trick the game into creating more of them. It may be possible to improve this with better heuristics however.
Only use about half the pool of enemy types at once and swap types in and out randomly between waves. Analysis could then be performed on the player's performance throughout the wave and each participating enemy type would be considered equally successful/unsuccessful. After a number of waves the success of enemy types would be varied enough to perform mutation/deletion.
This solution seems intuitively harder to exploit and it would also pick up on successful combinations of enemy types that might not be possible to detect by looking at individuals, however it might also result in anomalies where useless enemy types are considered successful because they happened to get assigned to waves with stronger enemy types backing them up.
To clarify, I'm not asking about the actual process of evolving enemies, just about how to measure which enemies are successful against the player.