I was surprised that search for fixed depth=5 yielded different best move (one with a worse score) from bare minimax. I was under the impression that alphabeta gives the same score as minimax but faster.
I'm wondering if it's due to some bug that I fail to see or maybe it's due to the fact that my evaluation is very simplistic (only material and mobility for all pieces)?
Here are the actual results (from starting position).
Minimax yields:
- Code: Select all
go depth 5
info pv a2a3 e7e6 e2e3 d8g5 d1g4
...
info nodes 4865609 pv e2e4 e7e6 d1f3 f7f5 f3h5 time 6057 depth 5 nps 803291 score cp 185 pvUpdates 1170856
bestmove e2e4
alpha beta:
- Code: Select all
go depth 5
...
info nodes 305537 pv e2e3 e7e6 d1f3 f7f5 f3h5 time 687 depth 5 nps 444461 score cp 180 pvUpdates 85387
bestmove e2e3
And here's the commit that introduced the change
https://github.com/macsmol/machess/comm ... d603b5dd20
Thanks for any help!