Skip to content

AhmedBineuro/XOEAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-O Game

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.

Installing and Running

Requirements

  • A C++ compiler
  • Makefile

Helpful Commands

  • make XOEAI — compile and run the game
  • make runXOEAI — run the compiled game again
  • make test — compile and run the test suite
  • make runTest — run the compiled test suite again
  • make clean — delete the generated executables

Note

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.

About

An experiment with condensing states into bit vectors and using them in useful ways

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors