Download the PHP package alcalyn/elo without Composer
On this page you can find all versions of the php package alcalyn/elo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package elo
Short Description Elo system with a reliability purpose
License MIT
Homepage https://github.com/alcalyn/elo
Informations about the package elo
Elo system
Another Elo implementation in PHP ! But this one introduce a reliability purpose.
Reliability purpose
A history: You have a good player A which played many games and have a score of 2100 Elo. A new player B subscribe to the game website, so his Elo score is initialized to 1500. But in fact, he is a very good player, better than A, and beat him like crushing an ant.
The problem: New player B will win many Elo because he won against a 2100 Elo player. That's ok. But player A (2100 Elo) will lose many Elo because he lost against a 1500 Elo player, but in fact strongest.
The fact is that the new player Elo score is not reliable, so it should not impact others players Elo scores.
The solution: This library. It introduces a reliability coefficient (decimal between 0.0 and 1.0) for Elo A and Elo B.
Composer
Install via composer
Or download the library manually if you don't use composer.
Usage
-
Instantiate a standard Elo system
-
Calculate updated Elo scores from old Elo
-
Set reliability coefficient to Elo scores
-
Using method aliases for win, lose or draw
- Instanciate a system with a different K factor (default is 16)
Detailled examples
A new player:
Player A has 2100 Elo, reliability 1.0
Player B has 1500 Elo, reliability 0.0
A wins: Expected result, so B loses a small amount of Elo, and A win nothing.
B wins: NOT expected result, so B wins a BIG amount of Elo, and A lose nothing.
A Elo score will not be updated when he plays versus a new player with an unreliable Elo score.
(And new player B should have its Elo reliability increased by something like 1/10 after every games until his reliability reaches 1)
Another example: two newbies players:
Player A has 1500 Elo, reliability 0.0
Player B has 1500 Elo, reliability 0.0
There is two new players, so their reliabilities are both 0.0: the algorithm takes them like if they were both 1.0.
And if player A had an Elo reliability equal to 0.4, and player B equal to 0.0, the algorithm adds them +0.6 so one of reliabilities reaches 1.0.
License
This project is under MIT Lisense