This is a simple command line implementation of the classic TicTacToe game. The board is encoded in a single 18-bit bitset where every 2 bits represent a cell with a state of Empty, X, or O. The winning patterns are also encoded in 18-bit bitsets.
The game features a simple AI using the MinMax algorithm.
- The AI has 5 difficulty levels, with levels 3 and above being nearly impossible to beat.
- A C++ compiler
- Makefile
make XOEAI— compile and run the gamemake runXOEAI— run the compiled game againmake test— compile and run the test suitemake runTest— run the compiled test suite againmake clean— delete the generated executables
Previously, I was planning to develop a handful of AI models on top of this game for learning purposes. Eventually, I chose to implement only one here, and reserve the others for more complex projects where the benefits of each model could be better showcased.
Maybe I will add a graphical application version in the future, but for now this is sufficient.