Substantial refactoring to implement correct Naive, UCT Monte Carlo tree search methods.

Removed unnecessary distinction between policy and tree search (tree search is a special kind of policy).
Calculation of all valid moves / arbitrary sets of moves is now a seperate class, as it serves a different purpose than a policy.
Introduced regression error in AlphaBeta test.
This commit is contained in:
cs6601
2012-08-28 10:40:37 -04:00
parent 36291171e5
commit bb5990a04f
39 changed files with 550 additions and 431 deletions

View File

@@ -0,0 +1,20 @@
package net.woodyfolsom.msproj;
import static org.junit.Assert.assertTrue;
import net.woodyfolsom.msproj.GameBoard;
import net.woodyfolsom.msproj.GameState;
import org.junit.Test;
public class LegalMoveTest {
@Test
public void testLegalMove1Liberty() {
GameState gameState = new GameState(5);
gameState.playStone('A', 2, GameBoard.BLACK_STONE);
gameState.playStone('B', 3, GameBoard.BLACK_STONE);
gameState.playStone('B', 1, GameBoard.BLACK_STONE);
assertTrue(gameState.playStone('B', 2, GameBoard.WHITE_STONE));
System.out.println(gameState);
}
}