Skip to content

Commit

Permalink
small fix to board jump heuristic
Browse files Browse the repository at this point in the history
  • Loading branch information
mbluemer committed May 2, 2017
1 parent 98dd9eb commit 51e6447
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Heuristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "Heuristic.hpp"

/* Heuristic Functions */

// counts number of setbits
//

using BB = BitBoard;

Expand Down Expand Up @@ -161,12 +160,12 @@ int Heuristic::jumpeablePieces() const
temp = (board->rotr32(emptyPos, 1) & BB::downLeft) & w;
accumP |= (board->rotr32(temp, 1) & BB::downLeft) & b;
temp = (board->rotl32(emptyPos, 7) & BB::upLeft) & w;
accumP |= (board->rotr32(temp, 7) & BB::upLeft) & kings;
accumP |= (board->rotl32(temp, 7) & BB::upLeft) & kings;
temp = (board->rotl32(emptyPos, 1) & BB::upRight) & w;
accumP |= (board->rotl32(temp, 1) & BB::upRight) & kings;
} else {
temp = (board->rotl32(emptyPos, 7) & BB::upLeft) & b;
accumP |= (board->rotr32(temp, 7) & BB::upLeft) & w;
accumP |= (board->rotl32(temp, 7) & BB::upLeft) & w;
temp = (board->rotl32(emptyPos, 1) & BB::upRight) & b;
accumP |= (board->rotl32(temp, 1) & BB::upRight) & w;
temp = (board->rotr32(emptyPos, 7) & BB::downRight) & b;
Expand Down

0 comments on commit 51e6447

Please sign in to comment.