00001 /** @page goboardhash Hash Code in Class GoBoard 00002 00003 @section goboardhashbasics Basics 00004 00005 The hash code is built using Zobrist hashing with random numbers for black 00006 and white stones on the board. 00007 GoBoard::GetHashCode returns the hash code; GoBoard::GetHashCodeInclToPlay 00008 returns the hash code including who is to play. 00009 GoBoard::GetHashCodeInclToPlay is always different from GoBoard::GetHashCode, 00010 independent who is to play. 00011 The hash code is always zero for an empty board, independent of the board 00012 size. 00013 00014 @section goboardhashko Ko Moves 00015 00016 If Ko moves are allowed and GoBoard::KoModifiesHash is true, then the 00017 hash code will also include the number of Ko wins (if there were any). 00018 00019 @section goboardhashhistory Capture History 00020 00021 As a heuristic fix to the Graph-History-Interaction (GHI) problem, 00022 the hash code also includes a component, that depends on the order, in 00023 which stones were captured. 00024 Currently this component cannot be enabled separatly, it is automatically 00025 enabled if GoBoard::KoModifiesHash is true, disabled otherwise. 00026 The idea is to eliminate hashing problems caused by the same 00027 position reached at different level in the search, or recapture 00028 is legal in one branch and illegal in another. 00029 It is not a complete solution to the GHI problem. 00030 */ 00031