首页 > > 详细

讲解Java、Java设计辅导、讲解留学生Homework Clobber 、Homework Clobber 编程解析

Homework Clobber
Description. You will write an evaluation function to guide alpha-beta search for the
game Clobber, which is described at http://en.wikipedia.org/wiki/Clobber (Links to an
external site.)Links to an external site. and repeated here. Briefly, the game is played on
a board with M columns and M+1 rows. Each side starts with an equal number of pieces
arranged as shown on the right. For our purposes, white will move first and will be
considered the home team. After the initial move, players take turns moving one of their
pieces. A player can move one of their own pieces one square in the following
directions North, South, East, or West. The move must land on an opponent’s piece,
which is removed from the board. The winning side is the player who moves last. That is,
a player loses when they are unable to move. The rules of the game prevent draws.
Guidelines.
 Your team may use external resources to learn about the game and how to play a
good game (as a human player). However, you may not use source code,
algorithms, or any other artifact geared towards a computerized solution.
 Your code must be written in Java.
 Your Java code must be placed into one class named after mam2.
 Please see me for information regarding using languages other than Java.
 Your final code must be compatible with the Tournament Moderator code distributed
to you. Thus, you should not make any changes to the Tournament Moderator code.
Whatever code you need to run reside in a single java file.
 Your team may not “spar” or collaborate with other teams or other pieces of software
created by others.
There are numerous features in the software that are not relevant to this project.
You can ignore timing issue, for example. Also, the tournament will pit only two
players against each other, as two examples.
Requirements.
 (45) You must provide a correct alpha-beta implementation for the game Clobber.
The game must search to a depth of 6 ply. You should provide the instructor the
ability to easily change this value.
 (45) You must provide an effective evaluation function to guide the game. This
evaluation function should dominate the random and systematic players. In addition,
it should be a challenging opponent to the instructor. Your evaluation function must
be O(N2) or faster, where N is the length of the maximum board dimension. In
addition, your evaluation function must not do any additional lookahead; it must take
measurements from the board only.
 (10) Provide a basic report that states what parts of your code works and what does
not. Describe the operation of your evaluation function.
Parameters and Configuration files
The config subdirectory contains configuration files for the server and individual games.
The server config file, tournament.txt, contains the information shown here. During
testing, you may want to adjust the number of games played. During testing, the
number of clients is often set to 2 – your client and one other (e.g., human player).
NUMCLIENTS=2
NUMGAMES=5
CONSECWINS=3
PORT=32101
Running the programs
During testing, you will probably run 2-client tournaments. To do this, first run the server
(ai.game.Tournament). This can be done from Eclipse or from the command line. Next,
run one or more clients whatever IDE you are using.
Dump files
When the server is started a new “Dumps” subdirectory is created that contains traces
of all the games played. The file names will look liked: C4 minimax6(R) vs C4 alpha
beta9(B) #0 LOSS. The filename encodes the team nicknames. The suffix contains the
game number between the two teams followed by the first team’s result: WON, LOSS,
DRAW, DQwin, DQloss, DQdraw. For this example, the game is: Game #0 in which
minimax played Red and alphabeta9 played black. Red lost. A second, identical, file will
also be placed into the directory: C4 alpha beta9(B) vs C4 minimax6(R) #0 WIN.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!