give more time to stockfish

This commit is contained in:
Thibault Duplessis 2013-06-06 15:41:05 +02:00
parent 42abc09f58
commit 89603cd3a6
4 changed files with 7 additions and 10 deletions

View file

@ -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)
}

View file

@ -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)

View file

@ -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()
}

View file

@ -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
}