Skip to content

Commit

Permalink
Update search.d
Browse files Browse the repository at this point in the history
  • Loading branch information
abulmo authored Jun 25, 2017
1 parent df48ff3 commit 1f2d6ce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/search.d
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ final class Search {
e = board.inCheck;
if (moves.isFirst(m)) s = -αβ(-β, -α, d + e - 1);
else {
s = -αβ(-α - 1, -α, d - 1);
s = -αβ(-α - 1, -α, d + e - 1);
if< s && s < β) s = -αβ(-β, -α, d + e - 1);
}
restore(m);
Expand Down Expand Up @@ -287,7 +287,11 @@ final class Search {
Move m = rootMoves[i];
update(m);
e = board.inCheck;
s = -αβ(-β, -α, d + e - 1);
if (i == 0) s = -αβ(-β, -α, d + e - 1);
else {
s = -αβ(-α - 1, -α, d + e - 1);
if< s && s < β) s = -αβ(-β, -α, d + e - 1);
}
restore(m);
if (stop) break;
if (s > bs && (bs = s) > α) {
Expand Down

0 comments on commit 1f2d6ce

Please sign in to comment.