Skip to content

Commit

Permalink
Rating color advantage test WIP (lichess-org#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddugovic committed Nov 22, 2024
1 parent 9915021 commit 94489ef
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ package glicko
class GlickoCalculatorWithColorAdvantageTest extends ChessTest:

import Outcome.*
// http://www.glicko.net/glicko/glicko2.pdf
// If the player is unrated, set the rating to 1500
// and the RD to 350. Set the player’s volatility to
// 0.06 (this value depends on the particular application)
val RD: Double = 350d
val V: Double = 0.06d

private def ratingDiff(r: Int, opRating: Int, outcome: Outcome, expected: Int)(using
munit.Location
) =
val player = Player(Glicko(r, 1d, 1d))
val opponent = Player(Glicko(opRating, 1d, 1d))
val player = Player(Glicko(r, RD, V))
val opponent = Player(Glicko(opRating, RD, V))
val game = Game(ByColor(player, opponent), outcome)
// TODO: calculator with color advantage
val calculator = GlickoCalculator()
Expand Down

0 comments on commit 94489ef

Please sign in to comment.