No machine learning. The AI is basically 2 functions:
A function that determines the score of the position. A positive score is good for white, a negative one is for black. To do that, the function takes into consideration the number/value of pieces on the board, the position of the pieces(Knight in the center is worth more than a knight on the edge for example), and the safety of the king.
Based on this score, I used Minimax to look multiple moves ahead, and determine the best outcome. Anything more than depth 3 makes the program take forever to compute though.
No machine learning. The AI is basically 2 functions:
A function that determines the score of the position. A positive score is good for white, a negative one is for black. To do that, the function takes into consideration the number/value of pieces on the board, the position of the pieces(Knight in the center is worth more than a knight on the edge for example), and the safety of the king.
Based on this score, I used Minimax to look multiple moves ahead, and determine the best outcome. Anything more than depth 3 makes the program take forever to compute though.
heh, that’s an… untraditional approach to chess algorithms :)
i’m very curious what the elo score for such an algorithm would be? have you tried to pair it against another bot to measure the score?
It’s actually not. Minimax has been used lots of times for chess AI in the past. There are probably better techniques that are used these days though.
Edit: when you search chess ai on YouTube, the top three videos are tutorials that use minimax, each with over a million views