How does a Board Game AI Work? (Connect 4, Othello, Chess, Checkers) – Minimax Algorithm Explained

In this video I build up the intuition for how an expert level board game AI works. We start with a very simple approach of making random moves and then progress to building board scoring heuristics and then finally to the minimax algorithm.

I will try to make a video on how to actually program this type of AI in python within the next few weeks. Make sure to subscribe to not miss that!

As a bit of background, the minimax algorithm was the same basic algorithm used in IBM Deep Blue that defeated Chess Grandmaster Gary Kasparov in 1997.

Link to my first video on how to program Connect 4 in Python:

Read more about the Minimax Algorithm:

Link to Stanford Paper on Othello AIs that I got some diagrams from:

Link to Medium Article on Programming a Chess AI:

Thank you guys for supporting my channel! Make sure to through this video a thumbs up and also subscribe! 🙂

Leave me a comment on what my next video should be on!


Xem thêm bài viết khác:

Article Categories:


  • Great video!! I am implementing 4 connect, but my heuristic function is pretty simple. I am thinking of implementing an heuristic vased on threats (even and odd threats). Which would be a way better AI. Any ideas on how to implement it?

    Jon Merladet July 28, 2020 5:55 pm Reply
  • Cool

    B & W Company LLC Wu July 28, 2020 5:55 pm Reply
  • Thank you for this informative video. It's really well explained! I was wondering if you have an updated link to that Stanford paper, the one in the discription doesn't work anymore!

    TheFatLeprechaun July 28, 2020 5:55 pm Reply
  • but in Othello, you don't need buffers because the AI will never choose them. After all, he thinks forward and he knows that if he puts in the buffer the human will put in the corner.

    uri harel July 28, 2020 5:55 pm Reply
  • Thanks for awesome now I got it I've tried to finding this connect 4 game

    Lisa Jizz July 28, 2020 5:55 pm Reply
  • this is slave labor

    Mr. Cheese Weenie 69 July 28, 2020 5:55 pm Reply
  • Note that this just works for 2 player games not for e.g. 4 player games.

    Lamprecht Markus July 28, 2020 5:55 pm Reply
  • I would like to use this heuristics in my project. How can I reference in paper?

    PEDRO MICHAEL July 28, 2020 5:55 pm Reply
  • How we can implement Deep Reinforcement learning in this model

    Burhanuddin Moiz Ali July 28, 2020 5:55 pm Reply
  • Great video sir ❤
    Thanks a lot ❤

    Moaz El-sawaf July 28, 2020 5:55 pm Reply
  • This is such a good video! Really explains minimax algorithm in a way that makes me confident enough to begin programming it. One thing… the link to the Stanford paper is broken, please check that out if you can. I would really appreciate that. But again, thanks a lot!

    TRANSC3ND3NC3 July 28, 2020 5:55 pm Reply
  • I am confused as to why Column 2 became -100 (8:32) if the AI was not looking ahead. As far as I can see it should be a +5

    DriveBoyDogBoy July 28, 2020 5:55 pm Reply
  • I'm ready

    Bernard Iyawe July 28, 2020 5:55 pm Reply
  • Great video!!! Highly recommend subscribing to Keith's channel!

    Kylie Ying July 28, 2020 5:55 pm Reply
  • You made this super easy to understand. Keep it up!

    Martin Cheung July 28, 2020 5:55 pm Reply
  • Second

    Darwins Explosions July 28, 2020 5:55 pm Reply

Leave a Reply

Your email address will not be published. Required fields are marked *