Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beautify move scores #111

Merged
merged 1 commit into from
Jul 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/scores.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

int piece_values[2][6] = { { 98, 337, 365, 477, 1025, 0}, { 114, 281, 297, 512, 936, 0} };

int killerscore1 = 900000;
int killerscore2 = 800000;
int killerscore1 = 6'000'000;
int killerscore2 = 5'000'000;

int reductions[MAX_MOVES][MAX_PLY];

Expand Down
11 changes: 4 additions & 7 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,25 +458,22 @@ int Search::mmlva(Move& move, Board& board) {

int Search::score_move(Move& move, int ply, bool ttMove, ThreadData *td) {
if (ttMove && move.get() == TTable[td->board.hashKey % TT_SIZE].move) {
return 2147483647 - 1;
return 10'000'000;
}
else if (move.promoted()) {
return 2147483647 - 20 + move.piece();
return 9'000'000 + move.piece();
}
else if (td->board.pieceAtB(move.to()) != None) {
return see(move, -100, td->board) ? mmlva(move, td->board) * 10000 : mmlva(move, td->board);
return see(move, -100, td->board) ? 7'000'000 + mmlva(move, td->board) : mmlva(move, td->board);
}
else if (td->killerMoves[0][ply] == move) {
return killerscore1;
}
else if (td->killerMoves[1][ply] == move) {
return killerscore2;
}
else if (td->history_table[td->board.sideToMove][move.from()][move.to()]) {
return td->history_table[td->board.sideToMove][move.from()][move.to()];
}
else {
return 0;
return td->history_table[td->board.sideToMove][move.from()][move.to()];
}
}

Expand Down