X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=hachu.c;h=c9350aedce27fa4cb77c48c14c52820f0f440bd7;hb=79c2db473050b802ced129d39a557e47053a2f71;hp=97cab1b4c9e1ddf73b4364c1e026d127c1c33a84;hpb=c37c927342f1cf2183ae32e73f2c08c937f2c6a9;p=hachu.git diff --git a/hachu.c b/hachu.c index 97cab1b..c9350ae 100644 --- a/hachu.c +++ b/hachu.c @@ -17,6 +17,7 @@ //define PATH 0 #define HASH +#define KILLERS #include #include @@ -113,7 +114,7 @@ char *array, fenArray[4000], *reason; int bWidth, bHeight, bsize, zone, currentVariant, chuFlag, tenFlag, chessFlag, repDraws; int stm, xstm, hashKeyH, hashKeyL, framePtr, msp, nonCapts, rootEval, retMSP, retFirst, retDep, pvPtr, level, cnt50, mobilityScore; int nodes, startTime, tlim1, tlim2, repCnt, comp; -Move retMove, moveStack[10000], path[100], repStack[300], pv[1000], repeatMove[300]; +Move retMove, moveStack[10000], path[100], repStack[300], pv[1000], repeatMove[300], killer[100][2]; int maxDepth; // used by search @@ -1694,6 +1695,14 @@ if(PATH) printf("%d:%2d:%2d msp=%d\n",level,depth,iterDep,msp); case 6: // non-captures nonCapts = msp; nullMove = GenNonCapts(oldPromo); +#ifdef KILLERS + { // swap killers to front + Move h = killer[level][0]; int j = curMove; + for(i=curMove; i= beta) { // beta cutoff - // update killer +#ifdef KILLERS + if(iterDep == depth && move != killer[level][0]) { + // update killer + killer[level][1] = killer[level][0]; killer[level][0] = move; + } +#endif resDep = retDep; goto cutoff; }