move more AI config to polyglot.ini
parent
19fa537525
commit
95b839b75c
|
@ -6,10 +6,7 @@ import actorApi._
|
|||
|
||||
private[ai] case class Config(
|
||||
command: List[String],
|
||||
hashSize: Int,
|
||||
nbThreads: Int,
|
||||
nbInstances: Int,
|
||||
syzygyPath: String,
|
||||
playMaxMoveTime: FiniteDuration,
|
||||
analyseMoveTime: FiniteDuration,
|
||||
playTimeout: FiniteDuration,
|
||||
|
@ -35,11 +32,7 @@ private[ai] case class Config(
|
|||
8 -> (if (variant == ThreeCheck) 14 else 12)
|
||||
) get levelBox(level)
|
||||
|
||||
def init = List(
|
||||
setoption("Hash", hashSize),
|
||||
setoption("Threads", nbThreads),
|
||||
setoption("Ponder", false),
|
||||
setoption("SyzygyPath", syzygyPath))
|
||||
def init = List.empty[String]
|
||||
|
||||
def prepare(req: Req) = (req match {
|
||||
case r: PlayReq => setoption("Skill Level", skill(r.level))
|
||||
|
@ -48,8 +41,7 @@ private[ai] case class Config(
|
|||
setoption("UCI_Chess960", req.variant == Chess960),
|
||||
setoption("UCI_KingOfTheHill", req.variant == KingOfTheHill),
|
||||
setoption("UCI_3Check", req.variant == ThreeCheck),
|
||||
setoption("UCI_Horde", req.variant == Horde),
|
||||
setoption("SyzygyProbeLimit", if (req.variant == Standard || req.variant == Chess960) 6 else 0))
|
||||
setoption("UCI_Horde", req.variant == Horde))
|
||||
|
||||
def go(req: Req): List[String] = req match {
|
||||
case r: PlayReq => List(
|
||||
|
|
|
@ -25,10 +25,7 @@ final class Env(
|
|||
|
||||
private val config = new Config(
|
||||
command = c.getStringList("command").toList,
|
||||
hashSize = c getInt "hash_size",
|
||||
nbThreads = c getInt "threads",
|
||||
nbInstances = c getInt "instances",
|
||||
syzygyPath = if (c hasPath "syzygy_path") c getString "syzygy_path" else "<empty>",
|
||||
playMaxMoveTime = c duration "play.movetime",
|
||||
analyseMoveTime = c duration "analyse.movetime",
|
||||
playTimeout = c duration "play.timeout",
|
||||
|
|
Loading…
Reference in New Issue