Mauritz8 / Vividmind

A UCI-compatible chess engine written from scratch in C++
0 stars 0 forks source link

faster is_checkmate implementation #54

Closed Mauritz8 closed 11 months ago

Mauritz8 commented 11 months ago

Right now it loops through all the legal moves and checks if any of them end on the king's square for each board state, but I think it should be possible to look for checkmate every time a move is played by just looking if it the move ends on the king's square. That should be a lot faster.

Mauritz8 commented 11 months ago

This isn't actually a big issue I realized, it's the move generation that's taking up like 99% of all the thinking time.