The code was a mess, and the program was slow af, but it was an amazing learning experience.

  • @MarcellusDrumOP
    link
    12 years ago

    No machine learning. The AI is basically 2 functions:

    1. 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.

    2. 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.

    • @k_o_t
      link
      22 years ago

      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?

      • @gun
        link
        2
        edit-2
        2 years ago

        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