give more time to stockfish
This commit is contained in:
parent
42abc09f58
commit
89603cd3a6
|
@ -12,12 +12,12 @@ private[app] final class AiStresser(env: lila.ai.Env, system: ActorSystem) {
|
|||
|
||||
def apply {
|
||||
|
||||
(1 to 64) foreach { i ⇒
|
||||
(1 to 24) foreach { i ⇒
|
||||
system.scheduler.scheduleOnce((i * 97) millis) {
|
||||
play(i % 8 + 1, true)
|
||||
}
|
||||
}
|
||||
(1 to 1) foreach { i ⇒
|
||||
(1 to 2) foreach { i ⇒
|
||||
system.scheduler.scheduleOnce((i * 131) millis) {
|
||||
analyse(true)
|
||||
}
|
||||
|
|
|
@ -74,9 +74,6 @@ final class Env(
|
|||
queue = stockfishQueue,
|
||||
config = stockfishConfig)
|
||||
|
||||
// preload stockfish
|
||||
if (!IsClient && EngineName == "stockfish") stockfishServer
|
||||
|
||||
private lazy val stockfishQueue = system.actorOf(Props(
|
||||
new stockfish.Queue(stockfishConfig)
|
||||
) withDispatcher StockfishQueueDispatcher, name = StockfishQueueName)
|
||||
|
|
|
@ -12,7 +12,7 @@ private[stockfish] final class Process(
|
|||
err: String ⇒ Unit,
|
||||
debug: Boolean) {
|
||||
|
||||
doLog("Start process")
|
||||
doLog("start process")
|
||||
|
||||
def write(msg: String) {
|
||||
log("> " + msg)
|
||||
|
@ -21,14 +21,14 @@ private[stockfish] final class Process(
|
|||
}
|
||||
|
||||
def destroy() {
|
||||
doLog("Destroy process")
|
||||
doLog("destroy process")
|
||||
try {
|
||||
write("stop")
|
||||
write("quit")
|
||||
Thread sleep 300
|
||||
}
|
||||
catch {
|
||||
case e: java.io.IOException ⇒ log(e.getMessage)
|
||||
case e: java.io.IOException ⇒ logwarn("[ai] process destroy " + e.getMessage)
|
||||
}
|
||||
process.destroy()
|
||||
}
|
||||
|
|
|
@ -18,12 +18,12 @@ private[ai] final class Queue(config: Config) extends Actor {
|
|||
def receive = {
|
||||
|
||||
case req: PlayReq ⇒ {
|
||||
implicit def timeout = makeTimeout((config moveTime req.level).millis + 100.millis)
|
||||
implicit def timeout = makeTimeout((config moveTime req.level).millis + 1.second)
|
||||
actor ? req mapTo manifest[Valid[String]] map sender.! await timeout
|
||||
}
|
||||
|
||||
case req: AnalReq ⇒ {
|
||||
implicit def timeout = makeTimeout(config.analyseMoveTime + 100.millis)
|
||||
implicit def timeout = makeTimeout(config.analyseMoveTime + 1.second)
|
||||
(actor ? req) mapTo manifest[Valid[Int ⇒ Info]] map sender.! await timeout
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue