Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualpatishi

Posted 26 June 2013 - 08:21 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combined with the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


EDIT:  ok i think i am starting to get it (so excited! )   by investigating the john tromp bitBoard code a little further, i see that he is doing a xor on the certain bitboard he likes to place a piece (e.g a bit of 1) with the number 1L <<  the index he save in the height[] array...  now i understand the purpose of tracking the first empty square in each column.  it is for the <<  operation.        

he also keep track of the plies played,  and checking if the current ply is even or odd so he knows whether its white's  turn of black's.      


#7patishi

Posted 26 June 2013 - 08:19 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combined with the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


EDIT:  ok i think i am starting to get it (so excited! )   by investigating the john tromp bitBoard code a little further, i see that he is doing a xor on the certain bitboard he likes to place a piece (e.g a bit of 1) with the number 1L <<  the index he save in the height[] array...  now i understand the importance of this track for the first empty square in each column.        

he also keep track of the plies played,  and checking if the current ply is even or odd so he knows whether its white's  turn of black's.      


#6patishi

Posted 26 June 2013 - 08:18 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combined with the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


EDIT:  ok i think i am starting to get it (so excited! )   by investigating the john tromp bitBoard code a little further, i see that he is doing a xor on the certain bitboard he likes to place a piece (e.g a bit of 1) with the number 1L <<  the index he save in the height[] array...  now i understand the impoprtance of this.        

he also keep track of the plies played,  and checking if the current ply is even or odd so he knows whether its white's  turn of black's.      


#5patishi

Posted 26 June 2013 - 08:18 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combined with the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


EDIT:  ok i think i am starting to get it (so excited! )   by investigating the john tromp bitBoard code a little further, i say that he is doing a xor on the certain bitboard he likes to place a piece (e.g a bit of 1) with the number 1L <<  the index he save in the height[] array...  now i understand the impoprtance of this.        

he also keep track of the plies played,  and checking if the current ply is even or odd so he knows whether its white's  turn of black's.      


#4patishi

Posted 26 June 2013 - 07:27 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combined with the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


#3patishi

Posted 26 June 2013 - 07:27 PM

well, for start i think that i will be using two full 64 bit Longs ( e.g bitboards),one for the white player and one for black (so i will have an extra 22 bits per board,so what)    i will store them

both in an array of size 2.  something like    static long[] board = new long[2];           I read some more about bit manipulation and started to get the trick of bit masking for checking states and such ,combinedwith the & (AND) operator.       but right now i am still facing the problem of how should i make and unmake moves on the bitboards (how do i set a certain bit to be 1 or 0 )??     can you please advice me to the right direction of doing this?


PARTNERS