Skip to content

Commit

Permalink
SEE pruning in qsearch - #26
Browse files Browse the repository at this point in the history
SEE pruning in qsearch

STC:
ELO   | 17.24 +- 9.10 (95%)
SPRT  | 10.0+0.10s Threads=1 Hash=16MB
LLR   | 2.97 (-2.94, 2.94) [0.00, 5.00]
GAMES | N: 3408 W: 1120 L: 951 D: 1337

LTC:
ELO   | 3.51 +- 2.81 (95%)
SPRT  | 60.0+0.60s Threads=1 Hash=256MB
LLR   | 2.95 (-2.94, 2.94) [0.00, 5.00]
GAMES | N: 31944 W: 8869 L: 8546 D: 14529

Bench: 2525875
  • Loading branch information
SzilBalazs authored Jul 19, 2023
2 parents e898c8f + 6b1dd10 commit ead3982
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/search/move_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "../core/movegen.h"
#include "history.h"
#include "see.h"

namespace search {
template<bool captures_only>
Expand Down
2 changes: 2 additions & 0 deletions src/search/search_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ namespace search {
while (!move_list.empty()) {
core::Move move = move_list.next_move();

if (alpha > -WORST_MATE && !see(board, move, 0)) continue;

shared.node_count++;
board.make_move(move, &nnue);
Score score = -qsearch<node_type>(-beta, -alpha);
Expand Down
2 changes: 1 addition & 1 deletion src/search/see.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace search {
stm = color_enemy(stm);

if (value >= 0) {
if (type == KING && (attackers & board.pieces(stm))) {
if (type == KING && (attackers & board.sides(stm))) {
stm = color_enemy(stm);
}
break;
Expand Down

0 comments on commit ead3982

Please sign in to comment.