-
Notifications
You must be signed in to change notification settings - Fork 2
Ranking system
License
mikaelkael/Ranking
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project is a PHP implementation of the Glicko2 ranking system: http://math.bu.edu/people/mg/glicko/glicko2.doc/example.html With the example provide in the above page: use Mkk\Game\Ranking\Glicko2 as RankingGlicko2; use Mkk\Game\Player\Glicko2 as PlayerGlicko2; $player1 = new PlayerGlicko2(array('id' = 1, 'rating' => 1500, 'ratingDeviation' => 200, 'volatility' => 0.06)); $player2 = new PlayerGlicko2(array('id' = 2, 'rating' => 1400, 'ratingDeviation' => 30, 'volatility' => 0.06)); $player3 = new PlayerGlicko2(array('id' = 3, 'rating' => 1550, 'ratingDeviation' => 100, 'volatility' => 0.06)); $player4 = new PlayerGlicko2(array('id' = 4, 'rating' => 1700, 'ratingDeviation' => 300, 'volatility' => 0.06)); $game = new RankingGlicko2(); $game->addPlayers(array($player4, $player3, $player1, $player2)); $game->updateRanking(); $player = $game->getPlayerById(1); echo $player->getNewRating(); echo $player->getNewRatingDeviation(); echo $player->getNewVolatility();
About
Ranking system
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published