I've implement a 3 * 3 Tic Tac Toe game in java applying Minimax algorithm only. However, when I change the board size to 4 * 4, the program seems to hang. I wanna ask whether I should apply Minimax with alpha-beta pruning to solve this problem or it is ok with Minimax itself?
Asked
Active
Viewed 539 times
0
-
It's been a long time since I worked with either, but I believe it should work correctly. Just have a look over your code again. Insert debug code to see where it is getting stuck. – Dale Myers May 20 '12 at 14:31
1 Answers
1
IF you're trying to do a full depth search, you need to use alpha-beta. A naive 4 x 4 search tree has 16! or about 21 trillion nodes. A lot of those nodes need not be searched because the other side refutes an ancestor position by winning on the next move or creating a position that forces a win 2 ply later. Alpha-beta will let you carve away some of these search spaces without traversing them.

Kyle Jones
- 5,492
- 1
- 21
- 30