Download the PHP package elijahcruz12/glicko2 without Composer

On this page you can find all versions of the php package elijahcruz12/glicko2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package glicko2

glicko2

A modern PHP 8.4 implementation of Glicko-2, a rating system for competitive game ladders. Glicko-2 is a refinement of the well-known Elo rating system that adds the concepts of rating deviation, volatility, and rating decay.

This is a clean, ground-up rewrite targeting PHP 8.4, with full type safety, immutable value objects, and a stateless calculator. It implements the algorithm as described in the official Glicko-2 paper by Professor Mark E. Glickman (revised March 22, 2022), including the corrected Illinois algorithm for volatility convergence.

This library is linked to on the official Glicko-2 page as a reference implementation.

Requirements

Installation

Usage

Creating a player rating

For new players, use the default values. The tau system constant should be between 0.3 and 1.2 depending on the application, and must be determined by estimation or experimentation. Smaller values prevent large swings in volatility.

Calculating updated ratings

Ratings are calculated at the end of a rating period — a collection of games treated as having occurred simultaneously. The Glicko2 calculator is stateless and returns a new Rating instance without mutating the original.

Players who did not compete

Pass an empty results array. The rating and volatility remain unchanged, but the RD increases to reflect growing uncertainty.

Outcomes

Serialization

Rating implements JsonSerializable and supports PHP's native serialize()/unserialize(), making it suitable for storage in a database or use with Laravel Queues.

JSON

The derived internal properties mu and phi are excluded from serialization — they are always recomputed from rating and rd on construction, so round-tripping through JSON is lossless.

Native PHP serialization

Laravel

For storing a player's rating in a database column, a simple JSON cast works well:

For Laravel Queues, Rating can be passed directly as a job property — PHP's native serialization handles it automatically.

Concepts

Rating (r) — The player's skill estimate. Defaults to 1500 for new players.

Rating Deviation (RD) — Uncertainty in the rating. High for new or inactive players, lower for active players with consistent results. Defaults to 350.

Volatility (σ) — How erratic the player's performance is expected to be. Defaults to 0.06.

System Constant (τ) — Constrains how much volatility can change per rating period. Recommended range is 0.3–1.2. Defaults to 0.75.

Rating periods

Glicko-2 works best when each rating period contains a moderate number of games — ideally at least 10–15 per player. All games within a period are treated as simultaneous. The length of a rating period is left to the administrator's discretion.

Testing

Tests are written with PestPHP and cover the full algorithm against the numerical example from the official Glicko-2 paper, including intermediate values for v, Δ, and σ′, as well as serialization round-trips.

License

MIT


All versions of glicko2 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package elijahcruz12/glicko2 contains the following files

Loading the files please wait ...