In both tabletop role-playing and computer games where players choose between different characters, some characters may be stronger than others when played optimally. This is undesirable in multiplayer games, because either most players will choose the stronger characters or some players will be handicapped by their weak character, which tends to reduce the enjoyment. Game designers spend time and resources “balancing” the game, i.e. changing aspects of the characters to give them all approximately equal strength. It is difficult to predict all possible ways a character may be played, so players may discover tricks that make a character significantly stronger than others. To counteract this, the game can be made self-balancing: the more players choose a given character, the weaker that character becomes. Then the discovery of ways to play a character better (giving additional strength) initially benefits the discoverer, but is neutralised with widespread imitation, analogously to innovative firms reaping monopoly profits initially from their patents, but eventually losing their competitive advantage to imitators.
The simplest way to self-balance is to subtract some measure of strength, e.g. health points, armor, attack points from the most frequently chosen characters. One in-game interpretation of this loss of strength to crowding is that each character channels power from some source (magic item, god, nature) and if more people channel a given source, then each of them gets less power. There are other ways to impose a negative congestion externality to achieve self-balancing.
One source of congestion-induced weakening is that in-game enemies (NPCs) fight better against characters they frequently encounter. This can be interpreted as learning (if the enemies flee before dying and later come back) or evolution (if the longer-surviving enemies multiply relatively more). In an evolutionary arms race, players pick characters that are strong against frequently encountered NPCs. NPCs vary in their resistance to different attacks and relatively more copies are spawned of those who last the longest under player attack.
Another congestion externality is a shortage of some resource that strengthens a particular class of characters. For example, equipment usable by that class may be in limited supply, in which case if many players choose that class, then they will find themselves under-equipped and weak. There could also be a shortage of materials for manufacturing the equipment, or a shortage of class-specific quests for gaining experience.
To make players (as opposed to NPCs or the game mechanics) the source of disadvantage to a frequently chosen class, the classes should have advantages over each other in a cycle, for example archers defeat riders, riders defeat swordfighters, swords defeat archers. In this case, if a class is frequently chosen, then this invites other players to choose another class that has an advantage over the frequent class, e.g. if many have chosen riders, then this creates an incentive to choose archers. Such a cyclical evolutionary dynamic has been observed in lizards (Rapid Temporal Reversal in Predator-Driven Natural Selection, Science 17 Nov 2006 Vol. 314, Issue 5802, pp. 1111).
Arena games have been trying to use the latter strategy (rock-paper-scissors) for a long time now. The problems start to occur when some class accidentally gains an advantage against its natural predator (e.g. archers find a way to run faster than swords so can always escape). Creators of rock-paper-scissors have been trying to nerf rock for quite some time, but it still manages to beat paper about third of the time.
As for the first method (stats depend on the number of players), it works for PvP (player[s] vs player[s]) but would not automatically work in PvE (player[s] vs environment), since different environments ask for different party compositions. For example, in MMORPG an average quest may require 1 tank, 1 healer, and 1 damage dealer (but can be done with some difficulty by any 2 out of 3 if one has too few friends), while some tough raid bosses would more sensibly require 1 tank, 2 healers and 10 damage dealers. The global “benchmark” proportions would then depend on how many people do usual quests vs how many do big raids. That said, it seems that PvE does not admit any auto-balancing strategy which does not require carefully balancing the world around it.
In PvE, if one player class is stronger than others, then players would learn this over time and select it more often. In response, more frequently chosen classes can be made weaker, self-balancing the game after a delay. If different players specialise in different quests and some classes are better at some quest types, then making more frequently chosen classes weaker still balances the game on average. However, the average may be due to a class that is too strong for one type of quest and too weak for another. The balancing then needs to be more fine-grained, for example the strength of a class adjusted for each quest (or quest type). If class A is very frequent among players doing quest A and infrequent among those doing quest B, then class A should be weakened for the duration of quest A and strengthened for quest B.