https://github.com/robbertstevens/phpelo
https://github.com/robbertstevens/phpelo
elo-rating php
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/robbertstevens/phpelo
- Owner: robbertstevens
- Created: 2019-09-07T08:16:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-07T09:53:48.000Z (almost 7 years ago)
- Last Synced: 2025-03-04T17:36:42.534Z (over 1 year ago)
- Topics: elo-rating, php
- Language: PHP
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHPElo
This is an implementation of the [Elo system](https://en.wikipedia.org/wiki/Elo_rating_system) created by [Arpad Elo](https://en.wikipedia.org/wiki/Arpad_Elo)
Too create a match you can use the `MatchFactory` class. The code below will create match between players both with an elo of 1500.
```php
$match = MatchFactory::createFromElo(1500, 1500);
```
To get the prediction of who is most likely to win the match. You can use the code below, this will return an percentage
```php
$expectedResult = $match->calculateExpectedResult();
```