Modify algorithm of chooseByePlayer to match OpenGotha

This commit is contained in:
Quentin Rendu
2023-12-29 12:23:59 +01:00
parent 43bd7c3dae
commit ac983918b0

View File

@@ -66,13 +66,13 @@ sealed class BaseSolver(
var weightForBye : Double var weightForBye : Double
var byePlayerIndex = 0 var byePlayerIndex = 0
for (p in nameSortedPairables){ for (p in nameSortedPairables){
weightForBye = p.rank + 2*p.main weightForBye = p.rank + 2*(p.main + p.rank)
if (p in byePlayers) weightForBye += 1000 if (p in byePlayers) weightForBye += 1000
if (weightForBye <= minWeight){ if (weightForBye <= minWeight){
minWeight = weightForBye minWeight = weightForBye
chosenByePlayer = p chosenByePlayer = p
} }
println("choose Bye: " + p.nameSeed() + " " + weightForBye) println("choose Bye: " + p.nameSeed() + " mms2 " +2*p.main+" "+ weightForBye)
} }
println("Bye player : " + chosenByePlayer.nameSeed()) println("Bye player : " + chosenByePlayer.nameSeed())
byePlayers.add(chosenByePlayer) byePlayers.add(chosenByePlayer)