CNegaScout::SearchAGoodMove(BYTE position[10][9]) { memcpy(CurPosition, position, 90); m_nMaxDepth = m_nSearchDepth; CalculateInitHashKey(CurPosition); ResetHistoryTable(); NegaScout(m_nMaxDepth, -20000, 20000); MakeMove(&m_cmBestMove); memcpy(position, CurPosition, 90); }
void CAlphabeta_HHEngine::SearchAGoodMove(BYTE position[10][9]) { memcpy(CurPosition, position, 90); m_nMaxDepth = m_nSearchDepth; ResetHistoryTable();//初始化历史记录表 AlphaBeta(m_nMaxDepth, -20000, 20000); m_umUndoMove.cmChessMove = m_cmBestMove; m_umUndoMove.nChessID = MakeMove(&m_cmBestMove); memcpy(position, CurPosition, 90); }
CNegaScout_TT_HH::SearchAGoodMove(BYTE byChessBoard[][9]) { memcpy(byCurChessBoard,byChessBoard,90);//传入棋盘 m_iMaxDepth=m_iSearchDepth; CalculateInitHashKey(byCurChessBoard); ResetHistoryTable(); NegaScout(m_iMaxDepth,-20000,20000); m_umUndoMove.cmChessMove=m_cmBestMove; m_umUndoMove.nChessID=MakeMove(&m_cmBestMove); memcpy(byChessBoard,byCurChessBoard,90);//传出棋盘 }
void CNegaScout_TT_HH::SearchAGoodMove(int position[10][10]) { CPublicToMakeMove ptmm; memcpy(CurPosition, position, sizeof(CurPosition)); m_nMaxDepth = m_nSearchDepth; CalculateInitHashKey(CurPosition); ResetHistoryTable(); // m_nMaxDepth = 1; // NegaScout(m_nMaxDepth, -20000, 20000); // m_nMaxDepth = m_nSearchDepth; // for (m_nMaxDepth = 1; m_nMaxDepth <= m_nSearchDepth; m_nMaxDepth++) NegaScout(m_nMaxDepth, -2000000, 2000000); MakeMove(&m_cmBestMove,ptmm,WHITE); memcpy(position,CurPosition,sizeof(CurPosition)); }
HistoryHeuristic::HistoryHeuristic() { ResetHistoryTable(); }