mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Make variable naming consistent
moved_piece is the only variable in search not using camel case
This commit is contained in:
parent
f731bcadb7
commit
dbc984d9f8
1 changed files with 8 additions and 8 deletions
|
@ -550,7 +550,7 @@ namespace {
|
||||||
Value bestValue, value, ttValue, eval;
|
Value bestValue, value, ttValue, eval;
|
||||||
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
||||||
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture;
|
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture;
|
||||||
Piece moved_piece;
|
Piece movedPiece;
|
||||||
int moveCount, quietCount;
|
int moveCount, quietCount;
|
||||||
|
|
||||||
// Step 1. Initialize node
|
// Step 1. Initialize node
|
||||||
|
@ -848,7 +848,7 @@ moves_loop: // When in check search starts from here
|
||||||
|
|
||||||
extension = DEPTH_ZERO;
|
extension = DEPTH_ZERO;
|
||||||
captureOrPromotion = pos.capture_or_promotion(move);
|
captureOrPromotion = pos.capture_or_promotion(move);
|
||||||
moved_piece = pos.moved_piece(move);
|
movedPiece = pos.moved_piece(move);
|
||||||
|
|
||||||
givesCheck = type_of(move) == NORMAL && !pos.discovered_check_candidates()
|
givesCheck = type_of(move) == NORMAL && !pos.discovered_check_candidates()
|
||||||
? pos.check_squares(type_of(pos.piece_on(from_sq(move)))) & to_sq(move)
|
? pos.check_squares(type_of(pos.piece_on(from_sq(move)))) & to_sq(move)
|
||||||
|
@ -906,8 +906,8 @@ moves_loop: // When in check search starts from here
|
||||||
|
|
||||||
// Countermoves based pruning
|
// Countermoves based pruning
|
||||||
if ( lmrDepth < 3
|
if ( lmrDepth < 3
|
||||||
&& (*contHist[0])[moved_piece][to_sq(move)] < CounterMovePruneThreshold
|
&& (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
|
||||||
&& (*contHist[1])[moved_piece][to_sq(move)] < CounterMovePruneThreshold)
|
&& (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Futility pruning: parent node
|
// Futility pruning: parent node
|
||||||
|
@ -942,7 +942,7 @@ moves_loop: // When in check search starts from here
|
||||||
|
|
||||||
// Update the current move (this must be done after singular extension search)
|
// Update the current move (this must be done after singular extension search)
|
||||||
ss->currentMove = move;
|
ss->currentMove = move;
|
||||||
ss->contHistory = &thisThread->contHistory[moved_piece][to_sq(move)];
|
ss->contHistory = &thisThread->contHistory[movedPiece][to_sq(move)];
|
||||||
|
|
||||||
// Step 14. Make the move
|
// Step 14. Make the move
|
||||||
pos.do_move(move, st, givesCheck);
|
pos.do_move(move, st, givesCheck);
|
||||||
|
@ -975,9 +975,9 @@ moves_loop: // When in check search starts from here
|
||||||
r -= 2 * ONE_PLY;
|
r -= 2 * ONE_PLY;
|
||||||
|
|
||||||
ss->statScore = thisThread->mainHistory[~pos.side_to_move()][from_to(move)]
|
ss->statScore = thisThread->mainHistory[~pos.side_to_move()][from_to(move)]
|
||||||
+ (*contHist[0])[moved_piece][to_sq(move)]
|
+ (*contHist[0])[movedPiece][to_sq(move)]
|
||||||
+ (*contHist[1])[moved_piece][to_sq(move)]
|
+ (*contHist[1])[movedPiece][to_sq(move)]
|
||||||
+ (*contHist[3])[moved_piece][to_sq(move)]
|
+ (*contHist[3])[movedPiece][to_sq(move)]
|
||||||
- 4000;
|
- 4000;
|
||||||
|
|
||||||
// Decrease/increase reduction by comparing opponent's stat score
|
// Decrease/increase reduction by comparing opponent's stat score
|
||||||
|
|
Loading…
Add table
Reference in a new issue