You are on page 1of 4

Othello Player: Alpha Beta Pruning

Muhammad Najib
Department of Computer Science
Hamilton College
March 13 2017

Abstract:

Figure 1: A typical Othello Board with 2 white and 2 black disks.

Introduction:

Othello is a board game based on black and white colored disks, played by two players at
a time. The player with the greater number of disks at the end wins the game. We have
tried to make a player that uses Alpha-Beta Pruning in trying to search for optimal
move at each step of the game.

Alpha-Beta Player (proj2Player):

Our player class named proj2Player performs an Alpha-Beta search on the decision tree
for the given Othello game and returns the optimal solution for the given move. We add
some interesting attributes to our proj2Player and test them against each other to figure
out which combination of different attributes produces the best player. These attributes
include the following:
1. assigning each move a certain amount of time,
2. varying the amount of time for different moves,
3. changing the utility function to include the following:
a. calculating the difference between total number of disks for each color
b. calculating the sum of corners occupied by a particular disk color
c. calculating the available moves for a certain move for a particular disk
color
d. calculating the number of disks on the edges for a particular disk

Alpha-Beta Player Logic:

We use the figure below to demonstrate the logic used by the Alpha-Beta player. In the
following figure, A is a MAX node. In order to decide which node A is going to pick, we
look at the successors of MIN nodes and make the assumption that MIN player is going
to pick the node that gives the least value. Since MIN player will pick the lowest value
from available options, MAX player picks the node that gives a higher minimum value
than any other option. In this case, A will pick B ahead of C and D since the minimum
value at B is 3 compared to 2 at C and D both. In addition, X and Y nodes are
irrelevant since we already figured out that C is not an optimal move for MAX player. We
pruned X and Y nodes and their branches from traversal, thus performing Alpha-Beta
Pruning.
Figure 1: The following game search tree shows X and Y values are irrelevant to Alpha-Beta player.1

The logic for Alpha-Beta pruning is very similar to Minimax player except that we
maintain the values of Alpha and Beta to prune nodes as needed. Alpha represents the
highest-value choice we have found so far at any option along the path for MAX players,
while Beta represents the lowest-value choice we have found so far at any given option
for MIN player.

Iterative Deepening and Cut-Off:

In addition to the basic Alpha-Beta algorithm, we add the attribute of a search Cut-Off at
a certain depth. This allows us to call the heuristic evaluation function when we reach the
appropriate depth, d, as defined in the function call for max_value or min_value function.
This approach also helps us to apply iterative deepening. In this case, iterative deepening
is applied such that when the time runs out, the program returns the optimal move under
the deepest completed search. This strategy gives us the incentive to apply different
schemes of using the timer such that we are able to allow some moves more time than the
other ones.

An example of this condition being used is pasted below:

Alpha-Beta vs Minimax Player:

1 Book
Experimental Results:

iterative deepening and cut-off


compare with minimax advantages maybe in a new section
o 1st para page 167
compare Hw2 player, proj2player, timer player timerplayer 2
future work
http://cs.stackexchange.com/questions/1069/what-use-are-the-minimum-values-
on-minimax-trees

You might also like