Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualpatishi

Posted 25 June 2013 - 11:00 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's (0,1 or 2) will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?     by the way,thanks for the java's Bitset tip, i think i will be using that :)



 


#7patishi

Posted 25 June 2013 - 10:50 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's (0,1 or 2) will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?   



 


#6patishi

Posted 25 June 2013 - 10:49 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's (0,1 or 2) will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?   


EDIT:  as far for my question on how to store the bytes array as long primitive,  i can just type that number above as a long type?  (00000000110....)  I just tried it out in java and don't have any problem with that,  but is this right?  
 


#5patishi

Posted 25 June 2013 - 10:48 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's (0,1 or 2) will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?   


EDIT:  as far for my question on how to store the bytes array in long,  i can just type that number above as a long type?   I just tried it out in java and don't have any problem with that,  but is this right?  
 


#4patishi

Posted 25 June 2013 - 10:29 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's (0,1 or 2) will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?   
 


#3patishi

Posted 25 June 2013 - 10:23 PM

thanks you for the answer, and although the bits operation stuff is a bit vague to me right now, i am trying to unserstand the first part of your solution.    

So basically i need to do two bytes arrays (or one two dimentional) in length of 42 (for all the board squares)  and each one of them will represent the pieces of one of the two players.(0 for no piece and 1 for a piece)

so for example, the byte array for the first player can look like this?   000000000000000000000000000000000000001000      here the first player just played his first move in the middle square at the buttom of the board.     so now every board representation ,instead of  one array of 42 int's will be those two Bytes arrays?    

and sorry for my ignorance,  but even if i have those two bytes array for the players' pieces,  how can i transpose each one of them to a Long type number?     
and after i do that,  how should i hash those two long numbers into one hash initeger so i can store in my TT?   
 


PARTNERS