ChandlerKenworthy / ChessEngine

Personal project to improve my C++ skills and develop a chess engine that can consistently beat me (I am about ~1500 chess elo).
0 stars 0 forks source link

Number of moves over-generated #10

Closed ChandlerKenworthy closed 9 months ago

ChandlerKenworthy commented 9 months ago

Running tests on the number of generated moves after certain depth - not consistent with values from leading engines. See excerpt below from running the move generation test.

Screenshot 2023-12-27 at 16 12 28
ChandlerKenworthy commented 9 months ago

It seems that test was bugged. I have now re-tested and I am consistent up to and including depth 2. Depth 3 now returns 1211797 (correct value is 8902). Which again is way too many but a little more under control.

ChandlerKenworthy commented 9 months ago

There was a bug in undo move which wasn't correctly over-writing bit boards. I have fixed this and now have this:

Number of generated moves after depth 3 = 245294 (correct = 8902).

ChandlerKenworthy commented 9 months ago

More problems in undo move fixed:

Number of generated moves after depth 3 = 134891 (correct = 8902)

ChandlerKenworthy commented 9 months ago

Number of generated moves after depth 3 = 9058 (correct = 8902)

ChandlerKenworthy commented 9 months ago

This issue has now been resolved up-to perft depth 3 in commit a11198799aa44e58007c9da78448340d3dd42cf5.