int from, to, piece, victim, new, booty, epSquare, epVictim, ep2Square, ep2Victim, savKeyL, savKeyH;\r
} UndoInfo;\r
\r
-int stm, xstm, hashKeyH, hashKeyL, framePtr, msp, nonCapts, retMSP, retFirst, level, chuFlag=1;\r
+int stm, xstm, hashKeyH, hashKeyL, framePtr, msp, nonCapts, rootEval, retMSP, retFirst, level, chuFlag=1;\r
int nodes, startTime, tlim1, tlim2;\r
Move retMove, moveStack[10000], path[100];\r
\r
{\r
sup0 = sup1; sup1 = sup2;\r
sup2 = MakeMove(move, &undoInfo);\r
+ rootEval = -rootEval - undoInfo.booty;\r
return stm ^ WHITE;\r
}\r
\r
void\r
UnMake2 (MOVE move)\r
{\r
+ rootEval = -rootEval - undoInfo.booty;\r
UnMake(&undoInfo);\r
sup2 = sup1; sup1 = sup0;\r
}\r
{\r
SetUp(chuArray, chuPieces);\r
sup0 = sup1 = sup2 = ABSENT;\r
+ rootEval = 0;\r
return WHITE;\r
}\r
\r
tlim2 = 1.9*targetTime;\r
nodes = 0;\r
MapFromScratch(attacks);\r
- score = Search(-INF-1, INF+1, 0, 20, sup1, sup2);\r
+ score = Search(-INF-1, INF+1, rootEval, 20, sup1, sup2);\r
*move = retMove;\r
*ponderMove = INVALID;\r
return score;\r