An AI led Java program for a Tic Tac Toe game using the recursive Minimax Algorithm for game & decision making theory.
- Download the .zip file from here
- Unzip/extract the dir
- Open the extracted directory in VsCode or any other IDE of your choice.
- Open
app.java
file in your referred IDE - Execute it in the terminal, cmd:
java app.java
- Make sure you have Java Development Kit (JDK) & Java Runtime Environment (JRE) installed and setup in your system already.
- If not, follow this & this for JDK & JRE respectively.
- The User starts the game and plays first
- User is assigned 'O', AI plays as 'X'
- To make your move, place [1-9] at any grid box
- Grid boxes being in a horizantal + downward order fashion
- '1' corresponding baord[0][0], '9' being board[2][2] and others being in similar manner
- The Algorithm used for the program is the Minimax recursive algorithm for game and decision making theory.
- Minimax algo | Wikipedia
- Minimax algo in Game theory (Set 1) | gfg.org
- Minimax in AI | Upgrad.com
- The Minimax algo | Educative.io
- Tic Tac Toe AI with MiniMax using Python | Java Coding Community
- Coding Challenge 154: Tic Tac Toe AI with Minimax Algorithm | The Coding Train
- JavaScript Tic Tac Toe Project - Unbeatable AI w/ Minimax Algorithm | freeCodeCamp.org