https://github.com/shenoy-anurag/elo
Elo python package to simulate matches between players, and compare their elo ratings after each match. You can use it to simulate rankings of Chess players. Published to PyPI.
https://github.com/shenoy-anurag/elo
elo elo-rating games python3
Last synced: 5 months ago
JSON representation
Elo python package to simulate matches between players, and compare their elo ratings after each match. You can use it to simulate rankings of Chess players. Published to PyPI.
- Host: GitHub
- URL: https://github.com/shenoy-anurag/elo
- Owner: shenoy-anurag
- License: mit
- Created: 2025-02-04T00:50:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-06T00:17:31.000Z (8 months ago)
- Last Synced: 2025-04-08T11:46:34.005Z (6 months ago)
- Topics: elo, elo-rating, games, python3
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview

Elo python package to simulate matches between players, and compare their elo ratings after each match, and visualize them. You can use it to simulate rankings of Chess players.
# Installation
Install using pip:
```text
$ pip install elo-viz
```or with [Poetry](https://python-poetry.org/):
```text
$ poetry add elo-viz
```# Usage
### Create Players
```py
import uuid
from elo_viz import Match, Playermagnus_carlsen = Player(id=uuid.uuid4().hex, name='Magnus Carlsen', rating=2833)
hou_yifan = Player(id=uuid.uuid4().hex, name='Hou Yifan', rating=2633)
gukesh_d = Player(id=uuid.uuid4().hex, name='Gukesh Dommaraju', rating=2777)
divya_d = Player(id=uuid.uuid4().hex, name='Divya Deshmukh', rating=2490)
```### Setup Matches
```py
m1 = Match(match_id=uuid.uuid4().hex, player1=magnus_carlsen, player2=gukesh_d)
m1.update_result(winner=magnus_carlsen.id)
```### Check results
```py
print(m1.player1)
```
Output
```log
Player: Magnus Carlsen Rating: Rating: 2883.0 Win %: 100.0
```# Requirements
- Python >= 3.13The version of the base environment I had installed poetry in.
Will update this so that any Python 3 version will work.