Chess AI using Python

Scott Fisher
Fall 2023

Why Chess?

When I first sat down to think about what I would be interested in doing for my capstone project I wanted something that would both be challenging but also feel rewarding. One day when browsing some YouTube videos I came across a YouTube video by Sebastian Lague detailing is adventure on creating a Chess AI. I was really captivated by this video and felt that I could accomplish something similar. It was an idea that I felt was a perfect combination of fun yet challenging. Thus started my endeavor to create a functioning Chess AI.

Why Python?

Now when it came down to the language that I was going to use I thought Python was going to be a simple decision. It has many libraries in place that could help simplify the process of creating a Machine Learning algorithm to learn how to play chess. Some of these libraries were: Python-Chess library (for chess logic), PyGame (for implementing a GUI), and PyTorch (for implementing the Machine Learning). With many tools being available to assist me in this endeavor I initially thought that Python might be my best choice for a first attempt at a Machine Learning program.

Final Thoughts

Overall this adventure into creating a Chess AI has been a huge struggle but overall a worth while project. I have learned so much about the limitations of the programming language I chose (Python) and also I was able to learn and develop my very first Neural Network. Obviously it turned out to not be the best Machine Learning AI ever developed but going forward I will be more than happy to continue to produce more work based on the expertise I have gained. If I could start this project again from scratch I think I would have developed it in C which would have allowed me to be able to create an overall better functioning search algorithm, but at the end of the day I am pleased with the work I have accomplished! I believe I am going to continue working on this project to try and test the limitations of my work outside of the time limitations of a project deadline and hopefully I can finally get my Neural Network to be able to respond within a reasonable amount of time!

Demo Video

Capstone Poster

css.php