https://github.com/diegobanos/php-glicko2
A PHP glicko2 implementation with an easy to use interface
https://github.com/diegobanos/php-glicko2
glicko2 library php rating
Last synced: 3 months ago
JSON representation
A PHP glicko2 implementation with an easy to use interface
- Host: GitHub
- URL: https://github.com/diegobanos/php-glicko2
- Owner: diegobanos
- License: mit
- Created: 2019-01-08T20:11:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T11:05:02.000Z (almost 7 years ago)
- Last Synced: 2025-12-14T22:11:30.298Z (7 months ago)
- Topics: glicko2, library, php, rating
- Language: PHP
- Size: 48.8 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-glicko2
[](https://travis-ci.org/diegobanos/php-glicko2)
A PHP glicko2 implementation with an easy to use interface.
## How to use
```php
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](http://www.glicko.net/glicko/glicko2.pdf).