CSC 440 - Project 2
Playing Games


Overview

In this homework there will be three parts: first writing an evaluation function for Mancala, second implementing the Alpha-Beta Pruning search, and third creating a custom Mancala player for an in-class AI Tournament.

Part 1 - Evaluation Function

There are many variants of the ancient board game Mancala. We will investigate the popular version Kalah which was invented in the 1940s.

Your first task is to design an evaluation function for the game of Kalah. It should return a high number if the board is favorable to the current player, and a low number if the board is favorable to their opponent.

To test your evaluation function, you will perform an experiment. Run 100 games of the MINIMAX player versus the RANDOM player, recording the winning player and the score. Plot your results as a bar graph for each type of player. Vary the ply searched from 2 to 8 and repeat. Compare your results using an unpaired t-test statistical test.

Part 2 - Alpha-Beta Pruning

You will find in the code the recursive algorithm for MINIMAX. Write a similar method to perform alpha-beta pruning search. Compare the number of nodes searched as you vary the ply from 2 to 8 in relation to MINIMAX.

Part 3 - Custom Player Tournament

Design your own custom player for Kalah. This can use any of the techniques we discussed in class or in the textbook, including transposition tables, lookup tables, etc. Your solution cannot take more than 5 seconds per move, and will be pitted against the other submissions in the class in a tournament to find the champion. The winner of this tournament will be awarded a Mancala set.

Code

What to Hand In

To hand in your Homework 2 files, place your code in a directory on the cs server called csc440/hw2.
© Mark Goadrich 2010, Centenary College of Louisiana, using code from Christine Alvrado at Harvey Mudd College