Menu
Close
Theme
Close

Themes

Languages 语言

中文

Game Study: Solving Connect Four

Learning to Solve Connect Four

I have been thinking about learning to solve classic board games like Connect 4 and Game of Go for a long time. Finally, during the winter holiday of 2024, I have some time to study the Connect Four Solving. By studying the blog http://blog.gamesolver.org, I have implemented the game solver, calculated the opening book, and combined it with a server backend and frontend webpage.

What did I do

Timeline

Challenges

I think, currently, the most significant challenge is to think about how to formalize and divide the whole game implementation - game solving - game visualization processes. The whole project is, in my opinion, a lot of work, and how can we divide it into multiple managable, testable, and reusable components is the biggest problem to think about to me. For example, when writing the Negamax algorithm for Connect Four, we might need to think about what are the key functionalities or characteristics that make the game solvable and how to express those behaviors.

General Tech stack

This programming language and its core conceptual design really help me to think and design more carefully and, as a result, quicker and safer. The Rust Programming Language also has a well-designed project structure and tutorial readings.

A Rust web library that enables me to fairly easily connect my Connect Four solving codes onto it with its design that allows passing shared information between threads.

Heroku is a platform as a service that enables developers to build, run, and operate applications in the cloud. I find its workflow very convenient. I learned how to make my own build pack and deployed the whole thing with the push of a button.

I have designed my own static pages rendering system.

1773286382682