Blog Posts by Date | tag: 'games'


How I built a Connect 4 AI


May 28, 2022 / 36 min read / 6,181 views, 3 likes, 0 comments


connect 4 with robot

I wrote the board game Connect 4 for my website! 😀 Here's a link to it if you want to check it out. The game can be played against another human or an AI opponent. It can even be played AI-vs-AI, which I find kind of fun to watch -- and which made testing the AI out much easier and more scientific (more on that later). This is the story of how I wrote the AI for the game intuitively, through some trial and error. This post was updated with a significantly enhanced AI version 6 a couple days after the initial release.

Read more...