This should be in the wiki, if it's not already there.
The easiest way to test game termination detection is to add a chunk of code to generate lots of games, each made from randomly selected moves, and keep track of the counts of the different game termination kinds.
Generate a million such games, and the counts should be fairly close to:
See 'testDrawRep()' at the bottom. It basically just starts with the opening position and plays through some moves, checking after each move whether it's a draw by rep or not.
I don't think I have anything that checks for a draw by rep within the context of a search but that satisfies me that the logic works, if I can manage to plug it in correctly.
sje wrote:This should be in the wiki, if it's not already there.
The easiest way to test game termination detection is to add a chunk of code to generate lots of games, each made from randomly selected moves, and keep track of the counts of the different game termination kinds.
Generate a million such games, and the counts should be fairly close to: