Skip to content

Commit

Permalink
Refactor: Remove test that used iterative deepening agent
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBergland committed Feb 5, 2024
1 parent 6cb91e5 commit 46debb2
Showing 1 changed file with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,46 +554,5 @@ void testUtilityOfSpecificStateFirst() {

}

@Test
void testUtilityOfSpecificStateSecond() {
int expected = -4;

connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(3));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(1));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(3));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(1));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(3));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(3));

connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(2));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(1));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(1));

connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(2));
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(2));

// Fills a column to lessen the amount of possible moves
/*
for (int i = 0; i < rowLength; i++) {
connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(columnHeight-1));
}*/

Agent iterativeDeep = new IterativeDeepeningAlphaBetaPruningMinimax(2);
Agent iterativeDeep2 = new IterativeDeepeningAlphaBetaPruningMinimax(60*10);
Agent iterativeDeep3 = new IterativeDeepeningAlphaBetaPruningMinimax(60*5);
//Agent alphaBetaPruning = new AlphaBetaPruningMinimax();

Action agentAction = iterativeDeep.getAction(connectFour);
//Action agentAction2 = iterativeDeep2.getAction(connectFour);
//Action agentAction3 = iterativeDeep3.getAction(connectFour);

connectFour = (ConnectFour) connectFour.result(connectFour.getActions().get(2));


int actual = connectFour.utility(-1);

assertEquals(expected, actual);

}
}
}

0 comments on commit 46debb2

Please sign in to comment.