Remove useTT compile time flag
This commit is contained in:
parent
5100bc744c
commit
d5f3071733
|
@ -73,7 +73,6 @@ proc getEstimatedMoveScore(self: SearchManager, move: Move): Score =
|
|||
nonSideToMove = sideToMove.opposite()
|
||||
if self.previousBestMove != nullMove() and move == self.previousBestMove:
|
||||
return highestEval() + 1
|
||||
when defined(useTT):
|
||||
let query = self.transpositionTable.get(self.board.position.zobristKey)
|
||||
if query.success and query.entry.bestMove != nullMove() and query.entry.bestMove == move:
|
||||
return highestEval() + 1
|
||||
|
@ -223,7 +222,6 @@ proc search(self: SearchManager, depth, ply: int, alpha, beta: Score): Score {.d
|
|||
# one because then we wouldn't have a move to return.
|
||||
# In practice this should not be a problem
|
||||
return
|
||||
when defined(useTT):
|
||||
if ply > 0:
|
||||
let query = self.transpositionTable.get(self.board.position.zobristKey, depth.uint8)
|
||||
if query.success:
|
||||
|
@ -299,7 +297,6 @@ proc search(self: SearchManager, depth, ply: int, alpha, beta: Score): Score {.d
|
|||
if ply == 0:
|
||||
self.bestMoveRoot = move
|
||||
self.bestRootScore = bestScore
|
||||
when defined(useTT):
|
||||
let nodeType = if bestScore >= beta: LowerBound elif bestScore <= alpha: UpperBound else: Exact
|
||||
self.transpositionTable.store(depth.uint8, bestScore, self.board.position.zobristKey, bestMove, nodeType)
|
||||
|
||||
|
|
|
@ -353,7 +353,6 @@ proc startUCISession* =
|
|||
of NewGame:
|
||||
session.board = newDefaultChessboard()
|
||||
of Go:
|
||||
when defined(useTT):
|
||||
if session.transpositionTable.isNil() or session.transpositionTable.size() == 0:
|
||||
session.transpositionTable = newTranspositionTable(session.hashTableSize * 1024 * 1024)
|
||||
if session.debug:
|
||||
|
|
Loading…
Reference in New Issue