Posts

Showing posts from January, 2021

Chess AI

Image
In the month of May, I was stuck inside due to the coronavirus restrictions, during which time I decided to learn python. It was a language I wanted to learn for a while at this point and with my newfound free time, I was able to do it. Since I now have a new language under my belt, and some experience in creating applications, I wanted to try my hand at something slightly more complicated. The game of chess is something I have been interested in since childhood, I started playing around age 5, and even took classes in school to learn more. As I grew up, I turned to the usage of engines and other such software to hone my skills and learn more about the game. When I became more interested in programming, I always had in the back of my mind that I would like to create a chess engine one day, and eventually I was skilled enough to take on the venture. Before any engine could be created, I first had to create the graphical user interface on which the game can be played. I did some research...

Connect Four AI

Image
The beginnings of this project were in high-school; for one of my computer science classes, we were given the task of creating a game of connect four that is playable by two players. This project consisted of placing the pieces in the correct spot and determining if there is a four-in-a-row. A few years later, I decided to create an engine out of the project. The goal of this engine was not to make it invincible, but rather make it play more human-like. This was done by using a simple heuristic approach; if I wished to make it invincible, then I would use a tree search method to search for all possible moves. This can easily be done since there are only around four trillion possible positions in connect four, meaning that the number of winning positions is relatively minute. Therefore, the game can easily be solved for any position, making it invincible to imperfect play. However, I wanted my engine to have an element of human-like play. This means that it plays logically based on what...