From 499c67ae3e0f4382f1e653f9f83c9e9fe1ab7656 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 1 Mar 2014 23:00:03 +0100 Subject: [PATCH] Fix sd command The maximum depth was not ofsetted by QSdepth, and was thus 4 less than requested. --- hachu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hachu.c b/hachu.c index b39efbf..3bffac4 100644 --- a/hachu.c +++ b/hachu.c @@ -2476,7 +2476,7 @@ printf("# SearchBestMove\n"); printf("# s=%d\n", startTime);fflush(stdout); MapFromScratch(attacks); retMove = INVALID; repCnt = 0; - score = Search(-INF-1, INF+1, rootEval, maxDepth, 0, sup1, sup2, INF); + score = Search(-INF-1, INF+1, rootEval, maxDepth + QSdepth, 0, sup1, sup2, INF); *move = retMove; *ponderMove = pv[1]; printf("# best=%s\n", MoveToText(pv[0],0)); @@ -2664,6 +2664,7 @@ pboard(board); } if(!strcmp(command, "sd")) { sscanf(inBuf, "sd %d", &maxDepth); continue; } if(!strcmp(command, "st")) { sscanf(inBuf, "st %d", &timePerMove); continue; } + if(!strcmp(command, "memory")) { SetMemorySize(atoi(inBuf+7)); continue; } if(!strcmp(command, "ping")) { printf("pong%s", inBuf+4); continue; } // if(!strcmp(command, "")) { sscanf(inBuf, " %d", &); continue; } -- 1.7.0.4