Players fight in leagues, the better/older goes to the upper leagues, the worse to lower.
Focus especially on degenerated situations (like not enough players), the solution should work all the time regardless of number of players, people quitting the game (so league can become emptier in the middle for not gameplay caused reason), etc.
I assume that there are +/- 10 players minimum needed per league (maximum is irrelevant). Everyone starts in league #1 (the lower the worse, so league #100 would keep higher level players than #1). There is exactly one league at the beginning (league #1) and further leagues are auto created as needed by the game.
The league system is best to be as general as possible, but for the purpose of the discussion we could assume that it is an arena gladiator match game.
How such thing could be implemented?
My solution (full of holes to fill...):
- everyone is set to league 1 at the beginning
- if there are mimimum 20 players then league #2 is created and the league system starts to work
- after each set of fights to 10% players are moved to higher league, bottom 10% players are moved to lower league (but no lower than #1)
- if the upper league has less than 10 players then minimum 10 players are promoted to that league even if they do not fit into top 10% winners (what if there is not enough of them and the bottom 10% losers would be required to be promoted as well?)
- each time there is more than 30 players per league, a new league is created (would not it cause moving inactives form the #1 to upper leagues?), then immediately top 10 players from ALL leagues are promoted.