jmrapp1 / Tic-Tac-Toe-With-AI

Tic Tac Toe with AI using the Minimax algorithm. Written in R for a final project in a college course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-Tac-Toe-With-AI

Tic Tac Toe with AI using the Minimax algorithm. This was written in R for a final project in a college course.

Running

I suggest using R-Studio to run the program.

Minimax

The Minimax Algorithm is a recursive algorithm used to make decisions that lead to maximize the minimum "cost/score" according to some heuristic/evaluation function.

The minimax function is defined and implemented on line 183. You can modify the depth of the algorithm to make the AI smarter. The higher the depth the further into the game the AI will look before making a decision. You can modify the depth on line 171.

Have fun!

About

Tic Tac Toe with AI using the Minimax algorithm. Written in R for a final project in a college course


Languages

Language:R 100.0%