Skip to content

Commit cfa8687

Browse files
authored
Update search.cpp
1 parent 5a64699 commit cfa8687

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

search.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ namespace engine
3333
}
3434
Value doSearch(Board &board, int depth, Value alpha, Value beta, Session &session, int ply = 0)
3535
{
36+
Value alphaOrig=alpha;
3637
std::fill(std::begin(session.pv[ply + 1]), std::end(session.pv[ply + 1]),
3738
Move::none());
3839
if (session.tm.elapsed() >=
@@ -104,16 +105,16 @@ namespace engine
104105
if (score > alpha){
105106
alpha = score;
106107
if (!board.isCapture(move))
107-
historyHeuristic[from][to] += depth * depth;
108+
movepick::historyHeuristic[from][to] += depth * depth;
108109
}
109110
if (alpha >= beta)
110111
{
111112
if (!board.isCapture(move))
112113
{
113-
if (killerMoves[ply][0] != move)
114+
if (movepick::killerMoves[ply][0] != move)
114115
{
115-
killerMoves[ply][1] = killerMoves[ply][0];
116-
killerMoves[ply][0] = move;
116+
movepick::killerMoves[ply][1] = killerMoves[ply][0];
117+
movepick::killerMoves[ply][0] = move;
117118
}
118119
}
119120

0 commit comments

Comments
 (0)