Program 4: Game Playing

Due Date

This assignment is due at the beginning of class on Friday, December 10th. This assignment may not be handed in late. During the class period on Friday, December 10th we will meet in EPS 254 and conduct a tournament.

Partners

You must work with one other person on this assignment. This means that there will be eight entries for the tournament. Submit one solution with both of your names on it.

Teams:

Purpose

The purpose of this assignment is to give you experience with AI game playing techniques in the context of the game of Mancala. It will also help reinforce your Common Lisp coding skills.

Driver Program

A driver program has been provided for you in the file driver.l. Notice that the white-get-move and black-get-move functions (and any other supporting functions) will ultimately need to be implemented by you. Both of these functions should return an integer that represents a legal move for the appropriate player.

White Program

Provide an implementation for the white player in a file named "white.l". Prefix all functions in this file with "white-".

Black Program

Provide an implementation for the black player in a second file named "black.l". Prefix all functions in this file with "black-".

Tournament Logistics

The tournament will be a round robin tournament where your program will play each of the other seven entries. You will play each opponent once as "white" and once as "black". Before playing a game, load the "white" file first, the "black" file second, and the "driver" file third. (A compiled version of the "driver" file will be provided for the tournament.) A sample sequence to play one game of Mancala appears next. It is assumed that each of the programs has already been compiled. It is also assumed that appropriate permissions (744) have been set so that files from other accounts can be loaded into the interpreter.

(load "white")
(load "~opponent/black")
(load "~paxton/driver")
(driver)

The winner will be determined using the following criteria:

  1. The first program to make an illegal move automatically loses the current game.
  2. On the day of the tournament, your program must be able to select its next move using 2 seconds of CPU time or less. If your program takes much longer for any given move, the program loses the game.
  3. Report the scores from both games to John.

What to Submit

Grading

Valid XHTML 1.0!