MyBB Community Forums

Full Version: Need help with game ranking algorithm for MyBB plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Recently I have been trying to figure out a simple way to rank players on a website. The top players will be ranked on the website from 1-10. #1 being the greatest, and #10 being the worst. The players are allowed to compete with each other and it is only a 2 player competition (1v1). A player can either win or lose but he cannot tie. Here's how the ranking system will work, for example, here is a proposed table:

   #1  Player1
   #2  Player2
   #3  Player3
   #4  Player4
   #5  Player5
   #6  Player6
   #7  Player7
   #8  Player8
   #9  Player9
   #10 Player10

If player5 was to play and beat player1, he would become rank #1, and player1 would become rank #2, and then the whole list would shift down a rank.

Becoming this:


   #1  Player5
   #2  Player1
   #3  Player2
   #4  Player3
   #5  Player4
   #6  Player6
   #7  Player7
   #8  Player8
   #9  Player9
   #10 Player10



However, the logic behind this would be hard to plot. I thought of different ways to do it, any the only way I could think of doing it is still not the most efficient (in my opinion). I was thinking it could be a system of points. And it might work this way:


     RANK  PLAYERS POINTS
     #1    Player1 10
     #2    Player2 20
     #3    Player3 30
     #4    Player4 40
     #5    Player5 50

Then whenever Player5 beats Player1, Player1 would keep his points but Player5's points would be 10-1=9.
So, then it would appear as:


   RANK  PLAYERS POINTS
   #1    Player5 9
   #2    Player1 10
   #3    Player2 20
   #4    Player3 30


This would give Player5 his new rank displaying him at the top,
however, a problem would occur after so many times of players playing. If 3 people played Player1 (Rank #2) after that, there would be 4 players that would have 9 points, complicating the entire process.

I can't think of a more simple way of doing it, but I feel like It shouldn't be as complicated as I make it out to be. Any help?