CS 6364 - Final Project Report - Vedang Wartikar (VPW210000)
1. How to execute
About
Usage: python3 <_FILE_NAME_>.py board1.txt board2.txt depth [-h] [--print_board [print_board]]
Generates the next move for the White/Black player using MiniMax and Alpha-Beta Pruning algorithms
positional arguments:
board1.txt Input File Name
board2.txt Output File Name
depth Depth of the search tree
optional arguments:
-h, --help show this help message and exit
--print_board [print_board]
Print the board
After running the opening_simulator.sh which simulates the 8 moves using the MiniMax algorithm for White and Black players consecutively, we get the following board. Here we can see that the White player was able to form a (vertical) mill and take out one of the Black player's pieces. The Black player was also able to block 2 potential mills of the White player.
For the following input board, the MiniMax and Alpha-Beta Pruning algorithms (ply 3) smartly place the White player's piece on the top right corner making it a possibility of at least 1 mill irrespective of the Black player's next move. The positions evaluated by the static estimation function and the Minimax estimate have been compared for both algorithms. We can clearly see that Alpha-Beta Pruning is very efficient in minimizing the unnecessary computations done by the MiniMax algorithm.
For the following input board, the MiniMax and Alpha-Beta Pruning algorithms (ply 5) the White player's piece at position 3 is moved to the top. The move is fairly simple, but as seen below the positions evaluated by Alpha-Beta Pruning are 360 and that of MiniMax is 4643. Therefore, Alpha-Beta is 13x more efficient that the MiniMax algorithm in terms if the positions being evaluated.
The static estimation function is tweaked to form a potential double mill at an intersection. The basic MiniMax algorithm for Black player does not consider such scenarios at the intersection and places its pieces in the ascending order.
The formation of a potential mill is highlighted by [ ] in both boards.