Skip To Main Content

Mobile Navigation

Seth C. '23 – Coding AIs to Play & Learn Tic-Tac-Toe

The inspiration: My inspiration came from two places: First, my desire to strengthen my coding skills and understanding of coding languages. I wanted to know more about how algorithms are built and share it with others. Secondly, I was inspired by the movie War Games and wanted to recreate some of the elements from the movie. (During the movie, an AI [artificial intelligence], “Joshua,” poised to destroy the world through nuclear war, was stopped when it was made to play Tic-Tac-Toe against itself. It ultimately determined that a perfectly played game of Tic-Tac-Toe, like nuclear war, has no winners!)

The process: My project was a four-parter and it began in a very different place from where it ended. First I coded a series of AIs that could play and learn the game Tic-Tac-Toe. I then created a website, wrote an analysis of a variety of AIs, and finally I created a community service section and blog. As I outlined in my notebook, I coded the first AI in Python, the coding language I was working on in my Coding II class. After a lot of time spent, I worked out that the website would only host Javascript. This meant I had to work through the entire project again in Javascript, a language I had not used for some time. Ultimately, my project ended up taking many long nights, but the process was massively interesting.

What I learned: Junior Workshop was a great experience in which I reinforced my understanding of both conceptual and practical coding elements, as well as learned about web design. Through Junior Workshop, I cut time out from my usual schedule to focus on bringing my creative vision to life.

What's next: I have done some different types of coding since, and I definitely plan on working on my idea as time goes on!