Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elo-rating
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songxinkai
elo-rating
Commits
3cb30215
Commit
3cb30215
authored
Aug 12, 2020
by
ziho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple elo rating system
parent
95fa4b2c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
elo.ipynb
+0
-0
elorating.py
+4
-4
No files found.
elo.ipynb
View file @
3cb30215
This diff is collapsed.
Click to expand it.
elorating.py
View file @
3cb30215
...
@@ -158,10 +158,10 @@ class EloRatingSystem:
...
@@ -158,10 +158,10 @@ class EloRatingSystem:
k
=
choose_k
(
R2
)
k
=
choose_k
(
R2
)
player2
.
rating
=
R2
+
k
*
(
1
-
winrate
-
E2
)
player2
.
rating
=
R2
+
k
*
(
1
-
winrate
-
E2
)
#
if player1.rating<0:
if
player1
.
rating
<
0
:
#
player1.rating=0
player1
.
rating
=
0
#
elif player2.rating<0:
elif
player2
.
rating
<
0
:
#
player2.rating=0
player2
.
rating
=
0
if
online
:
if
online
:
#print('{}\'s rating:{}->{} ; {}\'s rating:{}->{}'.format(p1,R1,player1.rating,p2,R2,player2.rating))
#print('{}\'s rating:{}->{} ; {}\'s rating:{}->{}'.format(p1,R1,player1.rating,p2,R2,player2.rating))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment