#tic-tac-toe #minimax #game #alpha #pruning #beta #heavily

app tictactoe-gui

Simple tictactoe game in Rust with GUI using ggez library and Minimax algorithm with Alpha Beta pruning. GUI heavily inspired by Alexander Ovchinnikov's version.

3 releases

0.1.2 Apr 24, 2021
0.1.1 Apr 24, 2021
0.1.0 Jan 1, 2020

#706 in Games

Download history 7/week @ 2024-02-23 5/week @ 2024-03-01 4/week @ 2024-03-08 1/week @ 2024-03-15 48/week @ 2024-03-29 5/week @ 2024-04-05

53 downloads per month

MIT/Apache

415KB
673 lines

tictactoe - GUI

tic-tac-toe game in Rust with a GUI using the awesome ggez library.

AI uses Minimax algorithm with Alpha Beta pruning to pick the best move. TODO: need to dumb AI down so the AI is beatable and is more fun to play against, rather than just an exercise. Perhaps adding a levels config limiting depth of minimax search and picking some random moves.

Human player starts first with X. AI plays with O.

GUI heavily inspired by Alexander Ovchinnikov's version

Dependencies

~27–38MB
~471K SLoC