marcluque / TicTacToe-AI

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

Home Page:https://marcluque.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

https://marcluque.com

License:BSD 2-Clause "Simplified" License


Languages

Language:Java 100.0%