BOTTOM/TOP default for DUDD
This commit is contained in:
@@ -28,6 +28,10 @@ data class Game(
|
|||||||
fun fromSymbol(c: Char) = byChar[c] ?: throw Error("unknown result symbol: $c")
|
fun fromSymbol(c: Char) = byChar[c] ?: throw Error("unknown result symbol: $c")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun bipPlayed(): Boolean {
|
||||||
|
return white == ByePlayer.id ||black == ByePlayer.id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// serialization
|
// serialization
|
||||||
|
@@ -40,8 +40,8 @@ data class MainCritParams(
|
|||||||
val scoreWeight: Double = MAX_SCORE_WEIGHT, // opengotha minimizeScoreDifference
|
val scoreWeight: Double = MAX_SCORE_WEIGHT, // opengotha minimizeScoreDifference
|
||||||
val drawUpDownWeight: Double = MAX_DRAW_UP_DOWN_WEIGHT, // opengotha DUDDWeight
|
val drawUpDownWeight: Double = MAX_DRAW_UP_DOWN_WEIGHT, // opengotha DUDDWeight
|
||||||
val compensateDrawUpDown: Boolean = true,
|
val compensateDrawUpDown: Boolean = true,
|
||||||
val drawUpDownUpperMode: DrawUpDown = DrawUpDown.MIDDLE,
|
val drawUpDownUpperMode: DrawUpDown = DrawUpDown.BOTTOM,
|
||||||
val drawUpDownLowerMode: DrawUpDown = DrawUpDown.MIDDLE,
|
val drawUpDownLowerMode: DrawUpDown = DrawUpDown.TOP,
|
||||||
val seedingWeight: Double = MAX_SEEDING_WEIGHT, // 5 *10^6, opengotha maximizeSeeding
|
val seedingWeight: Double = MAX_SEEDING_WEIGHT, // 5 *10^6, opengotha maximizeSeeding
|
||||||
val lastRoundForSeedSystem1: Int = 1,
|
val lastRoundForSeedSystem1: Int = 1,
|
||||||
val seedSystem1: SeedMethod = SeedMethod.SPLIT_AND_RANDOM,
|
val seedSystem1: SeedMethod = SeedMethod.SPLIT_AND_RANDOM,
|
||||||
|
@@ -5,6 +5,11 @@ import org.jeudego.pairgoth.model.Game.Result.*
|
|||||||
|
|
||||||
open class HistoryHelper(protected val history: List<List<Game>>, scoresGetter: HistoryHelper.()-> Map<ID, Double>) {
|
open class HistoryHelper(protected val history: List<List<Game>>, scoresGetter: HistoryHelper.()-> Map<ID, Double>) {
|
||||||
|
|
||||||
|
// List of all the pairables ID present in the history
|
||||||
|
val allPairables = history.flatten()
|
||||||
|
.map { game -> listOf(game.white, game.black) }
|
||||||
|
.flatten().distinct()
|
||||||
|
|
||||||
private val Game.blackScore get() = when (result) {
|
private val Game.blackScore get() = when (result) {
|
||||||
BLACK, BOTHWIN -> 1.0
|
BLACK, BOTHWIN -> 1.0
|
||||||
else -> 0.0
|
else -> 0.0
|
||||||
|
@@ -392,14 +392,14 @@ sealed class BaseSolver(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(true){
|
// if(true){
|
||||||
println("Names "+p1.nameSeed()+" "+p1.group+" "+p2.nameSeed()+" "+p2.group)
|
// println("Names "+p1.nameSeed()+" "+p1.group+" "+p2.nameSeed()+" "+p2.group)
|
||||||
println("Seed Sytem = " + currentSeedSystem.toString())
|
// println("Seed Sytem = " + currentSeedSystem.toString())
|
||||||
println("groupsize = "+p1.placeInGroup.second.toString()+" "+p2.placeInGroup.second.toString()+" "+groupSize)
|
// println("groupsize = "+p1.placeInGroup.second.toString()+" "+p2.placeInGroup.second.toString()+" "+groupSize)
|
||||||
println("place in group p1 = "+cla1.toString()+" p2 = "+cla2.toString())
|
// println("place in group p1 = "+cla1.toString()+" p2 = "+cla2.toString())
|
||||||
println("score = " + Math.round(score).toString())
|
// println("score = " + Math.round(score).toString())
|
||||||
println("detrandom(p1,p2) = " + (maxSeedingWeight-detRandom(seedingWeight*0.2, p1, p2)).toString())
|
// println("detrandom(p1,p2) = " + (maxSeedingWeight-detRandom(seedingWeight*0.2, p1, p2)).toString())
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return Math.round(score).toDouble()
|
return Math.round(score).toDouble()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user