diegobanos / php-glicko2
A PHP glicko2 implementation with an easy to use interface
Installs: 100 841
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 1
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-12-29 05:50:58 UTC
README
A PHP glicko2 implementation with an easy to use interface.
How to use
use Diegobanos\Glicko2\Rating\Rating; use Diegobanos\Glicko2\Result\Result; use Diegobanos\Glicko2\Glicko2; $glicko2 = new Glicko2; $rating = new Rating(1500, 200); $results = [ new Result(new Rating(1400, 30), 1), //victory new Result(new Rating(1550, 100), 0), //defeat new Result(new Rating(1700, 300), 0) //defeat ]; $updatedRating = $glicko2->calculateRating($rating, $results); //The updated rating will be (1464.06, 151.52, 0.05999)
You can also create your own Rating
class that implements Diegobanos\Glicko2\Rating\Rating\RatingInterface
.
Install
composer require diegobanos/php-glicko2
License
MIT License
Further reading
The algorithm implemented on this project is described in the following PDF.