rbaltrusch / chess_ng

Full chess engine including chess AI
MIT License
2 stars 2 forks source link

Minimax timeout #13

Open rbaltrusch opened 2 years ago

rbaltrusch commented 2 years ago

Currently, the minimax algorithm can run for a very long time at higher depths, with the time taken changing considerably from move to move. This is undesireable, because it makes using evaluation depths higher than around 4 or 5 impractical in all situations, even though they may give a better solution in many cases.

A timeout of the function (e.g. the minimax function call being fully aborted when reaching a specified time limit, and simply returning the most optimal move found until then), could alleviate some of these problems, by limiting the function call time to a maximum and making evaluation more consistent, allowing experimentation at higher search depths.