Skip to content

Commit

Permalink
Reduce LMR more when capture may not be able to produce a cut (#198)
Browse files Browse the repository at this point in the history
Co-authored-by: amanjpro <[email protected]>
  • Loading branch information
amanjpro and amanjpro authored Nov 25, 2021
1 parent e877ac0 commit b67ce74
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,12 @@ func (e *Engine) alphaBeta(depthLeft int8, searchHeight int8, alpha int16, beta
e.info.lmrCounter += 1
if isQuiet {
LMR = int8(quietLmrReductions[min8(31, depthLeft)][min(31, legalMoves)])
LMR -= int8(e.searchHistory.History(gpMove, currentMove, move) / 10649) //12288)
} else {
LMR = int8(noisyLmrReductions[min8(31, depthLeft)][min(31, legalMoves)])
if eval+move.CapturedPiece().Weight()+p < beta {
LMR += 1
}
}

if isInCheck {
Expand All @@ -761,12 +765,6 @@ func (e *Engine) alphaBeta(depthLeft int8, searchHeight int8, alpha int16, beta
LMR += 1
}

if isQuiet {
LMR -= int8(e.searchHistory.History(gpMove, currentMove, move) / 10649) //12288)
// } else {
// LMR -= 1
}

LMR = min8(depthLeft-2, max8(LMR, 1))
}

Expand Down

0 comments on commit b67ce74

Please sign in to comment.