Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add EloBenchmark in dry mode (no writes) [ci skip]
- Loading branch information
Showing
11 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
repository/SQPyte.package/EloBenchmark.class/instance/benchDryElo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
benchmark | ||
benchDryElo | ||
"Does not write any data" | ||
data dryAdjustPlayerScores |
4 changes: 4 additions & 0 deletions
4
repository/SQPyte.package/EloBenchmark.class/instance/benchDryEloWithAllInstances.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
benchmark | ||
benchDryEloWithAllInstances | ||
"Does not write any data" | ||
data dryAdjustPlayerScoresWithAllInstances |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
repository/SQPyte.package/EloMatch.class/instance/adjustPlayerScores.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
elo-ranking | ||
adjustPlayerScores | ||
|
||
|
||
| expected delta | | ||
expected := self blackPlayer chanceOfDefeating: (self whitePlayer). | ||
delta := (self outcome - expected) * EloMatch maxMovedPoints. | ||
self blackPlayer scorePoints: delta from: self whitePlayer. | ||
self blackPlayer scorePoints: delta from: self whitePlayer. | ||
|
7 changes: 7 additions & 0 deletions
7
repository/SQPyte.package/EloMatch.class/instance/dryAdjustPlayerScores.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
elo-ranking | ||
dryAdjustPlayerScores | ||
| expected delta | | ||
expected := self blackPlayer chanceOfDefeating: (self whitePlayer). | ||
delta := (self outcome - expected) * EloMatch maxMovedPoints. | ||
"self blackPlayer scorePoints: delta from: self whitePlayer." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
repository/SQPyte.package/EloRanking.class/instance/dryAdjustPlayerScores.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
elo-ranking | ||
dryAdjustPlayerScores | ||
"Estimate all player's Elo score given the match results" | ||
self matches do: [:match | match dryAdjustPlayerScores] |
4 changes: 4 additions & 0 deletions
4
repository/SQPyte.package/EloRanking.class/instance/dryAdjustPlayerScoresWithAllInstances.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
elo-ranking | ||
dryAdjustPlayerScoresWithAllInstances | ||
"Estimate all player's Elo score given the match results" | ||
EloMatch allInstancesDo: [:match | match dryAdjustPlayerScores] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(name 'SQPyte-fn.1' message 'Merge all packages into SQPyte package' id 'f5ae1847-ab7d-457e-9295-04ace7c39b9a' date '27 July 2016' time '7:01:05.449548 pm' author 'fn' ancestors () stepChildren ()) | ||
(name 'SQPyte-fn.2' message 'Add Elo dry mode' id 'cff22168-a9b5-48b0-9139-0f51e07fc695' date '28 July 2016' time '12:22:18.38458 pm' author 'fn' ancestors ((name 'SQPyte-fn.1' message 'Merge all packages into SQPyte package' id 'f5ae1847-ab7d-457e-9295-04ace7c39b9a' date '27 July 2016' time '7:01:05.449548 pm' author 'fn' ancestors () stepChildren ())) stepChildren ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters