diff --git a/app/game/DbPlayer.scala b/app/game/DbPlayer.scala index 0d0a90c30e..0c404e034e 100644 --- a/app/game/DbPlayer.scala +++ b/app/game/DbPlayer.scala @@ -48,8 +48,6 @@ case class DbPlayer( def hasMoveTimes = moveTimes.size > 8 - def eloEstimation = elo | 1200 - def moveTimeList: List[Int] = moveTimes.split(" ").toList map parseIntOption flatten diff --git a/app/game/Featured.scala b/app/game/Featured.scala index a191984f0e..3d350a2fdf 100644 --- a/app/game/Featured.scala +++ b/app/game/Featured.scala @@ -70,7 +70,7 @@ object Featured { private type Heuristic = DbGame ⇒ Float private val heuristicBox = box(0 to 1) _ - private val eloBox = box(1200 to 2000) _ + private val eloBox = box(1000 to 2000) _ private val timeBox = box(60 to 300) _ private val turnBox = box(1 to 21) _ @@ -81,7 +81,7 @@ object Featured { progressHeuristic -> 0.5f) def eloHeuristic(color: Color): Heuristic = game ⇒ - eloBox(game.player(color).eloEstimation) + eloBox(game.player(color).elo | 1000) def speedHeuristic: Heuristic = game ⇒ 1 - timeBox(game.estimateTotalTime) diff --git a/test/FeaturedTest.scala b/test/FeaturedTest.scala index 35f6bc493c..fe83ed3576 100644 --- a/test/FeaturedTest.scala +++ b/test/FeaturedTest.scala @@ -55,7 +55,7 @@ class FeaturedTest extends LilaSpec { "elo" in { "game1 white" in { - eloHeuristic(chess.Color.White)(game1) must_== 0.5f + eloHeuristic(chess.Color.White)(game1) must_== 0.6f } "game1 black" in { eloHeuristic(chess.Color.Black)(game1) must_== 0f @@ -85,13 +85,13 @@ class FeaturedTest extends LilaSpec { } "score" in { "game1" in { - score(game1) must_== 0.5f + 0f + 1f * 0.5f + score(game1) must_== 0.6f + 0f + 1f * 0.5f } "game2" in { - score(game2) must_== 0.5f + 0.5f + 0.5f * 0.5f + score(game2) must_== 0.6f + 0.5f + 0.5f * 0.5f } "game3" in { - score(game3) must_== 0.5f + 1f + 0f * 0.5f + score(game3) must_== 0.6f + 1f + 0f * 0.5f } } "best" in {