|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
PenteAgentProgram | Interface for your agent programs. |
PentePercept | A percept in the Pente environment. |
Class Summary | |
---|---|
PenteAction | Describes a move in the Pente game. |
PenteAgent | A Pente game-playing agent. |
PenteEnvironment | The Pente game environment. |
PenteEnvironmentObserver | An EnvironmentObserver customized for the Pente game environment. |
PenteGameLogObserver | An EnvironmentObserver customized for the Pente game environment. |
PenteGridCell | GUI class representing a Pente intersection. |
PenteGridPanel | GUI class for showing the Pente grid; just a few tweaks from the normal GridPanel. |
PentePerceptBoard | A percept describing the complete state of the board. |
PentePerceptEndgame | A percept received at the end of the game, indicating the winner if any. |
PentePerceptError | A percept indicating that the player's previous move was invalid. |
PentePerceptGame | Percept received just once, at the beginning of the game, indicating the basic setup of this game instance -- the size of the board, the operating rules, how many players there are, and which turn # your agent is assigned. |
PentePerceptRecentActions | A percept containing an ordered list of the legal moves that have been performed (including *this* player's move) in the past round. |
PenteRapidRunner | Runs many iterations of a game, tallying wins and losses for each player. |
PenteRules | A description of the rules for the current game. |
PenteRunner | Runs a single round of the Pente game. |
PenteScorekeeper | Quaint little class for keeping track of who wins or loses, and why. |
PenteTournamentRunner | Runs a game without GUI, printing each event to a log. |
Stone | A playing stone. |
Enum Summary | |
---|---|
PenteGridCell.Highlight | |
PentePerceptEndgame.GameResult | Possible outcomes of a game. |
PentePerceptError.ReasonForError | Explains why an attempted move is invalid. |
Stone.StoneColor |
Assignment 2: Pente game-playing.
In this environment, your agent is a player of the board game Pente.
Rules of Pente are described on pente.net. Our default set of rules are the "Tournament Rules" described there.
Your agent will initially receive a PentePerceptGame
indicating the rules of this particular instance of the game.
In subsequent rounds, your agent will receive two percepts: a PentePerceptBoard
describing the location of all stones on the board,
and a PentePerceptRecentActions
that is an ordered list of the most recent actions (including your own agent's last move).
Note that you may need to consider both the stone positions and the list of actions to completely understand the state of the game; for example, if a capture is performed, the capturing player is closer to winning than before; it would be foolish to overlook this.
Once you've followed the directions in the overview page for setting up your Java development environment, the setup for this assignment is easy. You should be able to just decompress the assignment file, run an ant compile, and get started.
Platform | Build environment | Instructions |
---|---|---|
Unix, Mac, Windows | Command-line tools |
To clean the project for a fresh start, type ant clean
To compile, type ant compile
To run, type ant run -Dplayer1=yourUNI.PenteAgentProgram
|
Eclipse IDE |
Create a new project from an ant buildfile, selecting the build.xml file. What else? Your feedback is appreciated. |
To run an instance of the game, type
awh2101.PenteAgentProgram
, which plays randomly, and the human.PenteAgentProgram
,
which allows you to control the player through a GUI interface.
The ant run
task accepts a variety of parameters to customize the game environment. You may supply these parameters
in any combination:
PenteRules
for a complete list
of available rule sets; you might try MiniGame
for a practice 5x5 board.Playing one game at a time is fine for debugging and early experimentation, but to do more methodical modification and improvement of your agent, you might want a way to compare two agents systematically. The RapidRunner class (and the associated ant task) allow you to run many game instances in a row, turning off the GUI and just collecting the final results.
To run multiple games between two players, type:
Now you can get started on the coding! Please remember to:
Document your code in Javadoc format. Essentially, this just means writing comments in the form:
/** * Single-sentence summary. * * <p> Longer explanation, which can contain HTML markup. </p> */before each class and method.
The documentation for each of your agent program classes (RoombaAgentProgram
and GreedyAgentProgram
) should explain what algorithm is used,
how it was implemented, the reasoning behind your heuristic function (if any), and any other special features of your program.
Use, if you want, the supplied interfaces to explicitly specify the structure of your program. You do not needto use the supplied interfaces -- as long as your code is clearly documented, and you explain how your code corresponds to the algorithms we've discussed in class and read in the text, you'll be fine. But feel free to use them as a guide, to help keep your program structure clean and neat.
Before the deadline (11am on October 10th), prepare your submission as follows:
Specification.txt
, Specification.html
, or Specification.pdf
with the following into your awh2101 directory:
Before the deadline (11am on October 19th), prepare your submission as follows:
Make sure I can read your extensive and clear documentation about your agent programs, the strategies you employed, and any additional classes you created (e.g. implementations of the HeuristicFunction interface).
Test that your documentation is properly generated by typing
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |