Infinite game collection

This commit is contained in:
lieght
2026-01-21 23:46:59 +01:00
parent 992523b936
commit 8a94aad622

View File

@@ -44,7 +44,6 @@ public class AITest {
versions[2] = new ArtificialPlayer(new MCTSAI3(5), "MCTS V3"); versions[2] = new ArtificialPlayer(new MCTSAI3(5), "MCTS V3");
versions[3] = new ArtificialPlayer(new MCTSAI4(5), "MCTS V4"); versions[3] = new ArtificialPlayer(new MCTSAI4(5), "MCTS V4");
for (int k = 0; k < 50; k++) {
for (int i = 0; i < versions.length; i++) { for (int i = 0; i < versions.length; i++) {
for (int j = i + 1; j < versions.length; j++) { for (int j = i + 1; j < versions.length; j++) {
final int playerIndex1 = i % versions.length; final int playerIndex1 = i % versions.length;
@@ -54,7 +53,6 @@ public class AITest {
} }
} }
} }
}
public static void addMatch(ArtificialPlayer v1, ArtificialPlayer v2) { public static void addMatch(ArtificialPlayer v1, ArtificialPlayer v2) {
matchupList.add(new Matchup(v1, v2)); matchupList.add(new Matchup(v1, v2));
@@ -70,10 +68,12 @@ public class AITest {
@Test @Test
public void testAIvsAI() { public void testAIvsAI() {
while (true) {
for (Matchup m : matchupList) { for (Matchup m : matchupList) {
playGame(m); playGame(m);
} }
} }
}
public void playGame(Matchup m) { public void playGame(Matchup m) {
long millisecondscounterAI1 = 0L; long millisecondscounterAI1 = 0L;