Skip to content
/ TicTacToe Public

TicTacToe with 2 game modes. One AI agent uses MiniMax with Alpha-Beta Pruning, the other Temporal Difference Algorithm

Notifications You must be signed in to change notification settings

M0kY/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe

This TicTacToe app written in Swift was made within the scope of my graduation thesis.

Features

There are two versions of the game. In each the AI is implemented using a different algorithm

  • MinMax with Alpha-Beta Pruning
  • Reinforcement Learning (Temporal Difference Algorithm)

Training the AI

The training method was to let 2 AI-s which use the same algorithm (TD) play against each other for 10,000 iterations. Below are presented the results of the AI against a human player after different number of training iterations.

1,000 iterations 5,000 iterations 10,000 iterations
Human Wins 5 7 0
Draw 5 3 10
AI Wins 0 0 0

Better results for the 1,000 iteration case are due to the human player requiring more time to find out the stategy to abuse.

About

TicTacToe with 2 game modes. One AI agent uses MiniMax with Alpha-Beta Pruning, the other Temporal Difference Algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages