/TicTacToe-AlphaBeta-AI

Play TicTacToe against the AlphaBeta algorithm

Primary LanguageC++

TicTacToe Game against an "AI" opponent

Console game of Tic Tac Toe in which you battle an unbeatable "AI" opponent. The opponent is actually the Min-Max algorithm (with the Alpha Beta pruning optimization) used for evaluating best possible move in finite games with full information.

Controls:

  • The arrow keys - navigate the field
  • Space - play your turn

Comparison between Min-Max and Alpha-Beta pruning

  • The game shows the time it took to calculate the move
  • This comes in handy as the difference between the code of the two algorithms is small
  • Tests have shown that the optimized version is up to 20 times faster especially when evaluating the first move of the AI

Credits:

  • Stoefff: "AI" and game logic
  • StageGreen : UI and game logic