See golden-games.ts. For whatever reason the generated games are slightly different compared to just always using 'search.findBestMove'.
I spent an hour (?) investigating and I have no idea why. It'd be nice to walk through 'findBestMove' with the debugger. Maybe it's due to the transposition table?
Update: possibly because when we reach depth=0 in the search, we don't actually detect draws/checkmate, we just use leaf eval - but evaluateBoard does do detection at depth=0, which is an inconsistency.
Update 2: I tried changing evaluateBoard to use leaf eval, but it just got worse.
See
golden-games.ts. For whatever reason the generated games are slightly different compared to just always using 'search.findBestMove'.I spent an hour (?) investigating and I have no idea why. It'd be nice to walk through 'findBestMove' with the debugger. Maybe it's due to the transposition table?
Update: possibly because when we reach depth=0 in the search, we don't actually detect draws/checkmate, we just use leaf eval - but evaluateBoard does do detection at depth=0, which is an inconsistency.
Update 2: I tried changing evaluateBoard to use leaf eval, but it just got worse.