next up previous
Next: Project 2: Setting the Up: W4444 Programming and Problem Previous: Group Membership for Projects

Project 1: Jackhammer

Jackhammer was a project from the 2007 version of Programming and Problem Solving. The project description from 2007 is presented below. We will revisit this project in 2008, with the reports and programs from last years' groups available to you in courseworks. Of course, you're welcome to start from scratch if you think you have a new way of approaching the problem. (An advantage of starting with a previous problem is that it is easier to learn the mechanics of working with the provided programming interface.)

Directly building on the code from last year is acceptable, but keep the following points in mind:

Jackhammer is a game played on a triangular mesh, similar to that used in Chinese checkers. There are three players, who each start in one corner of the mesh. The size of the mesh is 17 units on a side, meaning that there are $17*18/2=153$ positions on the board.

On a turn, a player may move to an adjacent cell in any of the (up to) 6 valid directions for movement. Alternatively, a player may stay put and use a jackhammer to ``knock out'' an adjacent cell. Once a cell is hammered in this way, it is no longer available for movement by any of the players. A player may also choose to stay put without hammering a cell.

All players specify their moves simultaneously, and moves are resolved simultaneously. Multiple players can occupy the same cell.

Minor rules:

A game finishes after 1000 turns. (In class we can discuss whether this is a reasonable number. We can always change it if a larger number turns out to be more interesting.)

The idea of the game is to claim territory. At the end of the game, a player's score will be the number of unhammered cells reachable (in zero or more legal moves) from the player's final position. However, if some other player is also reachable from the player's final position, then the score for both players is zero. It is possible for all three players to score zero!

Your job is to write a computer player to score well in this game. Your program will be run against the programs of other groups, and the winner will be the player with the highest average score over all rounds played.

Your player will not know the identity of the opposing players. (Nevertheless, a smart program might be able to guess identities based on player behavior: we'll discuss whether this is considered ethical in class.) The complete board state and history is available to all players.

Some things to think about:


next up previous
Next: Project 2: Setting the Up: W4444 Programming and Problem Previous: Group Membership for Projects
Ken Ross 2008-09-16