changed the way multithreading worked

This commit is contained in:
ramollia
2026-01-21 20:05:19 +01:00
parent f168b974ab
commit 5d2fff7ae7
9 changed files with 106 additions and 163 deletions

View File

@@ -210,7 +210,7 @@ public final class Server {
Player[] players = new Player[2];
players[userStartingTurn] = new ArtificialPlayer(new MCTSAI3(1000, Runtime.getRuntime().availableProcessors()), user);
players[userStartingTurn] = new ArtificialPlayer(new MCTSAI3(1000), user);
players[opponentStartingTurn] = new OnlinePlayer(response.opponent());
switch (type) {

View File

@@ -14,11 +14,9 @@ import org.toop.app.widget.complex.ViewWidget;
import org.toop.app.widget.popup.ErrorPopup;
import org.toop.app.widget.tutorial.*;
import org.toop.game.players.ai.MiniMaxAI;
import org.toop.game.players.ai.RandomAI;
import org.toop.game.players.ai.mcts.MCTSAI1;
import org.toop.game.players.ai.mcts.MCTSAI3;
import org.toop.game.players.ai.mcts.MCTSAI4;
import org.toop.game.players.ai.mcts.OPMCTSAI;
import org.toop.local.AppContext;
import javafx.geometry.Pos;
@@ -85,12 +83,12 @@ public class LocalMultiplayerView extends ViewWidget {
players[0] = new LocalPlayer(information.players[0].name);
} else {
// players[0] = new ArtificialPlayer(new RandomAI(), "Random AI");
players[0] = new ArtificialPlayer(new MCTSAI4(500, 4), "MCTS V4 AI");
players[0] = new ArtificialPlayer(new MCTSAI1(100), "MCTS V1 AI");
}
if (information.players[1].isHuman) {
players[1] = new LocalPlayer(information.players[1].name);
} else {
players[1] = new ArtificialPlayer(new MCTSAI1(500), "MCTS V1 AI");
players[1] = new ArtificialPlayer(new MCTSAI4(100), "MCTS V4 AI");
}
if (AppSettings.getSettings().getTutorialFlag() && AppSettings.getSettings().getFirstReversi()) {
new ShowEnableTutorialWidget(