2017 © Pedro Peláez
 

library glicko2

A PHP implementation of Glicko2 rating system

image

zelenin/glicko2

A PHP implementation of Glicko2 rating system

  • Monday, May 2, 2016
  • by zelenin
  • Repository
  • 2 Watchers
  • 4 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Glicko2

A PHP implementation of Glicko2 rating system, (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

php composer.phar require zelenin/glicko2 "~1.0.0"

or add, (*4)

"zelenin/glicko2": "~1.0.0"

to the require section of your composer.json, (*5)

Usage

Create two players with current ratings:, (*6)

use Zelenin\Glicko2\Glicko2;
use Zelenin\Glicko2\Match;
use Zelenin\Glicko2\MatchCollection;
use Zelenin\Glicko2\Player;

$glicko = new Glicko2();

$player1 = new Player(1700, 250, 0.05);
$player2 = new Player();

$match = new Match($player1, $player2, 1, 0);
$glicko->calculateMatch($match);

$match = new Match($player1, $player2, 3, 2);
$glicko->calculateMatch($match);

// or

$matchCollection = new MatchCollection();
$matchCollection->addMatch(new Match($player1, $player2, 1, 0));
$matchCollection->addMatch(new Match($player1, $player2, 3, 2));
$glicko->calculateMatches($matchCollection);

$newPlayer1R = $player1->getR();
$newPlayer2R = $player2->getR();

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me, (*7)

The Versions

02/05 2016

dev-master

9999999-dev https://github.com/zelenin/glicko2

A PHP implementation of Glicko2 rating system

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

rating ranking glicko glicko2

02/05 2016

1.0.0

1.0.0.0 https://github.com/zelenin/glicko2

A PHP implementation of Glicko2 rating system

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

rating ranking glicko glicko2