Tic Tac Toe game that never lets you win.
- Use of Heuristic for move ordering.
- Idea of similar states is implemented to reduce search space.
- Iterative deepening and depth-limited search is implemented using above 2.
curses
- Type the following on the terminal
git clone https://github.com/jinit24/TicTacToe
cd TicTacToe
python3 iterative_deepening.py
- Type the size of grid you want to play on then type 1 or 2 to select which player you want to play as.
- Select using the mouse any sqaure that you want to mark.
Iterative deepening has a time limit of 1 second for each move. Other implementations don't have a limit on time.
- algo.py - Contains the heart of the algorithm : alpha-beta pruning and the naive version.
- checks_counts.py - Contains the checking of board and generation of possible moves. (Similar states idea implemented in this)
- UI_elements.py - Contains the making of the board using curses and variable initialization for the same.
- Iterative_deepening.py and depth_limited_search.py - Contain the final move generation and adding time and depth limits.