Search
Reversi is a two player game.
Let us take a square playing board consisting of N x N square fields. The playing board is clearly delimited and board's edges do not neighbor each other. We have stones of two colors(traditionally black and white), one color per player. AT the beginning there are four stones in the middle of the board in this configuration:
Player whose turn it is, then places a stone so that it closes off his opponents row. These stones then turn into his. It works like this:
Player A placed his stone at the bottom, and this is the result:
It is now Player B's turn.
You can place stones either diagonally, horizontally or vertically. If a player cannot place a stone in a way that would take at least one stone, he loses his turn. The game ends when either the board is full, or neither player can place his piece. The objective is to have more stones than your opponent after the game ends.
You are to create a player, that will play properly (no exceptions and obeying the rules) and better than every other player.
During this assignment we will see properties of following kinds of problems:
Just like in the whole course, foremost we value your effort. You do not have to worry about not finishing this course just because of this assignment if you at least try. However, during the upcoming weeks, there will be several control points, where we check your progress. At the end, all the algorithms will be compared by playing against the algorithms of all the other students and you should try to score as high as you can.
More details are here.
Submission is done in two phases:
Player
.java
ReversiPlayer
Reversi
reversi.jar
$$$
cz.cvut.agents.rph.reversi.players
PlayerXxxxxxxx
Xxxxxxxx
PlayerNovakja1
getName()
makeNextMove(int[][] board)
ReversiMove
board
getMyColor()
init(…)
super.init(…)
cz.cvut.agents.rph.reversi.main.ReversiCreator
DummyPlayer
ReversiCreator
cz.cvut.agents.rph.reversi.players.PlayerNovakja1 cz.cvut.agents.rph.reversi.players.DummyPlayer
You can set the time limit used for limitation of the reasoning time by setting the parameter timeout. This can be set by --timeout=XXX parameter of class ReversiCreator where XXX is maximal time (in milliseconds) for which your player can stay in method makeNextMove(). During debug and testing it can be helpful to set this parameter high, e.g. run the class ReversiCreator with parameters cz.cvut.agents.rph.reversi.players.PlayerNovakja1 cz.cvut.agents.rph.reversi.players.DummyPlayer --timeout=99000000
timeout
makeNextMove()
cz.cvut.agents.rph.reversi.players.PlayerNovakja1 cz.cvut.agents.rph.reversi.players.DummyPlayer --timeout=99000000
Source code for the reversi.jar framework will be at your disposal after the submission of the siplme player.