CS4444: Programming & Problem Solving, Fall 2003
[Project 3: Generalized Clue]
Game Design, Interfaces, Player Guide & Class Notes




Generalized Clue Poem
The Makers may make,
and the users may use,
but the players must play,
with but minimal clues.
		- Clueless



Group Assignments
The following is the group assignment for this project:
1HFMASLREDnew Color(1.0f,0.0f,0.0f)
2ELAGARGREENnew Color(0.0f,1.0f,0.0f)
3MBBBGPBLUEnew Color(0.0f,0.0f,1.0f)
4LGEHASYELLOWnew Color(1.0f,1.0f,0.0f)
5JWANYZCYANnew Color(0.5f,1.0f,1.0f)
6VSYSMMPURPLEnew Color(1.0f,0.5f,1.0f)
7DVLUVDORANGEnew Color(1.0f,0.8f,0.3f)


Final Players



Project Reports



Tournament Results
CardsPerPlayer \ Players 2 3 5 7 9
1 Hidden = 1, 2 Hidden = 1, 2 Hidden = 1, 2 Hidden = 1, 2 Hidden = 1, 2
2 Hidden = 1, 2, 4 Hidden = 1, 2, 4 Hidden = 1, 2, 4 Hidden = 1, 2, 4 Hidden = 1, 2, 4
3 Hidden = 1, 3, 6(B) Hidden = 1, 3, 6 Hidden = 1, 3, 6 Hidden = 1, 3, 6 Hidden = 1, 3, 6(A)
5 Hidden = 1, 2, 5, 10(B) Hidden = 1, 2, 5, 10(B) Hidden = 1, 2, 5, 10 Hidden = 1, 2, 5, 10(A) Hidden = 1, 2, 5, 10(A)
8 Hidden = 1, 4, 8, 16(B) Hidden = 1, 4, 8, 16(B) Hidden = 1, 4, 8, 16 Hidden = 1, 4, 8, 16 Hidden = 1, 4, 8, 16
16 Hidden = 1, 8, 16, 32(B) Hidden = 1, 8, 16, 32(B) Hidden = 1, 8, 16, 32 Hidden = 1, 16
Special Tournament with Dumb Random Player, CPP = 5, Hidden = 5(A)
Notes:

Game Design

Exposed Game Engine Methods
The following methods are exposed by the game engine and are available to the player when evaluating potential cookie placements:

public int maxRounds() throws Exception;

public int currRound() throws Exception;

public int numPlayers() throws Exception;

public int numCards() throws Exception;

public int numHiddenCards() throws Exception;

public int numCardsPerPlayer() throws Exception;

public int indexOf(IFCPlayer player) throws Exception;

public MoveResult history(int round) throws Exception;

public int[] getPlayerList(int playerindex, IFCPlayer player) throws Exception;

Method Description
maxRounds() Returns the maximum number of rounds in the game after which the players will be forced to guess.
currRound() Returns the current round number.
numPlayers() Returns the number of Players at the start of the game.
numCards() Returns the total number of cards.
numHiddenCards() Returns the number of hidden cards.
numCardsPerPlayer() Returns the number of cards each player has.
indexOf(IFCPlayer player) Returns the index of player in the game.
history(int round) Returns the MoveResult object corresponding to the given round.
getPlayerList(int index, IFCPlayer player) Returns the card list of a player. Returns a non-null list only when player 'index' is out of game or if its the caller itself. To get your own cardlist call getPlayerList(indexOf(), this) from within your Player class, otherwise the second argument is redundant.

Player Interface
Players are required to implement the following interface:

public interface IFCPlayer extends IFCConstants, Serializable {

public void register(Cluedo __noclue) throws Exception;
public String name() throws Exception;
public Color color() throws Exception;
public boolean interactive() throws Exception;
public Move move() throws Exception;
public int question(int interrogator, int[] cardlist) throws Exception;
public void answer(int interrogatee, int[] mycardlist, int response) throws Exception;
public int[] forcedGuess() throws Exception;
public void notifyPlayerExit(int playerexited) throws Exception;
}
Method Description
register(Cluedo __noclue) Gives the Player a chance to get Game configuration parameters by calling the exposed methods of the Cluedo object __noclue.
name() Returns the name of the Player.
color() Color of Player's cards.
interactive() HumanPlayer returns true, everyone else returns false.
move() Moves can be of two types: 1) Guess 2) Interrogation. See DumbPlayer for an example of how to specify your moves.
question(int interrogator, int[] cardlist) Player 'interrogator' has asked you a question with the accompanying cardlist. You have to return the value of one of the cards from the list you have, or 0 if you have none.
answer(int interrogatee, int[] mycardlist, int response) This the response player 'interrogatee' has given to the question you asked it with the list 'mycardlist'
forcedGuess() The Game is closing ! This is your last chance to make a guess.
notifyPlayerExit(int playerexited) Just to let you know that player 'playerexited' has left the game. You can have a look at what cards it had by calling getPlayerList(playerexited, null)


Software
The full software source tree and class files are available from:

Software

In addition, a targzipped version of the directory is also available in that directory. You can access the targzipped file directly at:

Software/software.tar.gz



Class Notes

Thursday, September 16th

Tuesday, September 21st Absent: AN MM

Thursday, September 23rd Absent: AN MA LG

Tuesday, September 28th Absent: YZ

Thursday, September 30th


kamra-at-cs.columbia.edu