From 08d6ecd6caef26b9d5922bae1cf3d0213f68af4d Mon Sep 17 00:00:00 2001 From: Theo Barollet Date: Tue, 23 Jan 2024 19:22:56 +0100 Subject: [PATCH] clean before merge --- .../jeudego/pairgoth/pairing/solver/BaseSolver.kt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/pairing/solver/BaseSolver.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/pairing/solver/BaseSolver.kt index 1589b68..8b32f46 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/pairing/solver/BaseSolver.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/pairing/solver/BaseSolver.kt @@ -184,9 +184,6 @@ sealed class BaseSolver( // This cost is never applied if potential Handicap != 0 // It is fully applied if wbBalance(sP1) and wbBalance(sP2) are strictly of different signs // It is half applied if one of wbBalance is 0 and the other is >=2 - if (p1.name == "Marechal" && p2.name == "Goloubkov") { - println("coucou ${p1.colorBalance} ${p2.colorBalance}") - } val hd1 = pairing.handicap.handicap(p1, p2) val hd2 = pairing.handicap.handicap(p2, p1) val potentialHd: Int = max(hd1, hd2) @@ -197,9 +194,8 @@ sealed class BaseSolver( else if (wb1 == 0 && abs(wb2) >= 2 || wb2 == 0 && abs(wb1) >= 2) colorBalanceWeight / 2 else 0.0 } else { // apply a *big* score to let the stronger player have white - //if (hd2 == 0) colorBalanceWeight * 10 - //else 0.0 - 0.0 + if (hd2 == 0) colorBalanceWeight * 10 + else 0.0 } return score } @@ -423,8 +419,8 @@ sealed class BaseSolver( fun GeographicalParams.apply(p1: Pairable, p2: Pairable): Double { val placementScoreRange = groupsCount - //val geoMaxCost = pairing.geo.avoidSameGeo - val geoMaxCost = 100000000000.0 + val geoMaxCost = pairing.geo.avoidSameGeo + //val geoMaxCost = 100000000000.0 val countryFactor = preferMMSDiffRatherThanSameCountry val clubFactor: Int = preferMMSDiffRatherThanSameClub