|
Post by Angelo Cafaro on Feb 22, 2011 11:19:58 GMT -5
Please feel free to ask questions here that relate to the second programming assignment.
Cheers!
Hannes and Angelo
|
|
|
Post by thorsteinnth on Feb 28, 2011 12:47:41 GMT -5
What does the "make" function in the "State" class do exactly? Is the class "Move" only a container for a integer representing a square on the board?
Let's say I have a board that is 6x7, and empty it looks something like this:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
And then I would pass a instance of "Move" into the "make" function, that contains the value "15", would that mean the board should look something like this afterwards ( X representing the move ):
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
|
Post by Angelo Cafaro on Feb 28, 2011 14:04:41 GMT -5
What does the "make" function in the "State" class do exactly? Is the class "Move" only a container for a integer representing a square on the board? Let's say I have a board that is 6x7, and empty it looks something like this: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 And then I would pass a instance of "Move" into the "make" function, that contains the value "15", would that mean the board should look something like this afterwards ( X representing the move ): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 The Move class is simply a container for the index of the column representing that movement, BUT it's up to you to update correctly your State and put the Disks starting from the bottom line. So, you should never have the situation described above...
|
|
|
Post by arnists on Mar 1, 2011 7:25:24 GMT -5
Have you put up the machine the competition will be run on? Could we get the specs on it please (which cpu, how much memory, which Ubuntu etc.)? Will we be allowed to compile on the machine if we are making a C/C++ version of our code?
|
|
|
Post by Helgi Siemsen Sigurðarson on Mar 1, 2011 9:10:18 GMT -5
in public int getEvaluation() the value can be positive if it your turn and negative if it is reds turn but it will always return positive because of: return ( getPlayerToMove() == Player.Black ) ? value : -value; with changes the negative value into a positive am i missing some thing ?
|
|
|
Post by Angelo Cafaro on Mar 1, 2011 11:03:27 GMT -5
Have you put up the machine the competition will be run on? Could we get the specs on it please (which cpu, how much memory, which Ubuntu etc.)? Will we be allowed to compile on the machine if we are making a C/C++ version of our code? We are working on it thanks also to Stefan Freyr, the only information I know is that we are using Ubuntu, by the end of today or tomorrow I'll post an announcement with all the information needed about the hardware configuration. We'll also discuss about the compilation and testing issues on the next class (thursday).
|
|
|
Post by Angelo Cafaro on Mar 1, 2011 11:06:11 GMT -5
in public int getEvaluation() the value can be positive if it your turn and negative if it is reds turn but it will always return positive because of: return ( getPlayerToMove() == Player.Black ) ? value : -value; with changes the negative value into a positive am i missing some thing ? You should calculate the evaluation value always from the Black point of way, no matter if this value will be negative or positive. Because having an high value, for example, would mean that Black as a good evaluation for that state, on the other hand this should be a negative valule for Red...that's why it's negated at the end.
|
|
|
Post by Helgi Siemsen Sigurðarson on Mar 2, 2011 11:36:03 GMT -5
when the time limit or depth is reach does it stop searching and calculating or can it still calculate what is the best state of the ones it has found already ?
|
|
|
Post by Angelo Cafaro on Mar 2, 2011 13:04:43 GMT -5
when the time limit or depth is reach does it stop searching and calculating or can it still calculate what is the best state of the ones it has found already ? You should have "the best" value available at that moment. However the "time limit" it's something we will define together before the tournament and depending also on the actual configuration of the machines where you'll run the player. So you could adjust, for example, the depth parameter for your client in order to stay in the time limit having a value.
|
|