I am basically trying to implement only the winning conditions for my engine in bit boards.
I am sucessful when I tried to play this is tested in multiplayer mode, but it doesnt function when my AI plays. I have used print statements to check my code and found that the player array which holds bits of players, doesnot return same values in single player-mode and multiplayer mode. So something is fishy in my makeMove method and I tried to rectify it, but unsuccessful.
I also looked at Mr.Tromp's search method, but in a way its far too different than my implementation, so tried to modify and reuse the logic of bit-boards according to my code and think sort of messed it up.
Here is what I have coded so far.
public static void undoMove(int board1[], int square, boolean white) {
board1[square] = 0;
int n;
n = moves[--nplies];
players[nplies&1] ^= 1L<<--height[n];
}
public static void makeMove(int[] board1, int square, boolean white) {
int n = square % 7;
players[nplies&1] ^= 1L<<height[n]++;
moves[nplies++] = n;
}
I have hand tested the evaluation conditions and it works fine.
Can anybody suggest something about this?