Skip to content

A simple AI for TicTacToe with Alpha-Beta pruning and binary encoding for the board

License

Notifications You must be signed in to change notification settings

marcluque/TicTacToe-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToeAI

License Made With Love Java CI with Maven Coverity Quality Gate Status CodeFactor Codacy Badge DeepSource Language grade: Java BCH compliance GuardRails badge

This is a simple AI for TicTacToe. There is no real challenge in constructing an AI for a game like TicTacToe. The purpose of this project was the binary encoding of the board and an as efficient as possible MiniMax. The algorithm is implemented with and without Alpha-Beta pruning.

Results with MiniMax on my machine:

MiniMax runtime results

Alpha-Beta:

Alpha-Beta runtime results

My machine:
Debian 11
Intel i5-8250U @ 1.60 GHz
8 GB DDR4-2400 SDRAM