Fixed unit tests, changed MDP generation to more reasonably seek the goal state, avoiding premature end of game.
Removed unused google-code classes. Regenerate policy when AdaptiveComPlayer.setTarget() is called.
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
package model.mdp;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import model.mdp.MDP.MODE;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ValueIterationSolverTest {
|
||||
|
||||
@Test
|
||||
public void testSolve() {
|
||||
MDPSolver solver = new ValueIterationSolver();
|
||||
|
||||
//solve for a score of 25 in at most 35 turns
|
||||
int maxScore = 6;
|
||||
int maxTurns = 10;
|
||||
|
||||
MDP mdp = new MDP(maxScore,maxTurns,MODE.CEIL);
|
||||
Policy policy = solver.solve(mdp);
|
||||
|
||||
assertTrue(policy.size() >= maxScore);
|
||||
assertTrue(policy.size() <= maxTurns);
|
||||
|
||||
System.out.println("Policy: " + policy);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user