static void playMatchesBetweenVersions(int player1version, int player2version, int EPISODES, int turns_until_tau0, int goes_first = 0) { Residual_CNN player1_NN, player2_NN; if (player1version == -1) { player1 = new User("player1", Game.StateSize, Game.ActionSize); } else { player1_NN = new Residual_CNN(Config.REG_CONST, Config.LEARNING_RATE, Game.InputShape, Game.ActionSize); player1 = new Agent("player1", Game.StateSize, Game.ActionSize, Config.MCTS_SIMS, Config.CPUCT, player1_NN); if (player1version > 0) { player1_NN.ReadModel(player1version); } } if (player2version == -1) { player2 = new User("player2", Game.StateSize, Game.ActionSize); } else { player2_NN = new Residual_CNN(Config.REG_CONST, Config.LEARNING_RATE, Game.InputShape, Game.ActionSize); player2 = new Agent("player2", Game.StateSize, Game.ActionSize, Config.MCTS_SIMS, Config.CPUCT, player2_NN); if (player2version > 0) { player2_NN.ReadModel(player2version); } } playMatches(player1, player2, EPISODES, turns_until_tau0, goes_first); }
public Agent(String name, int state_size, int action_size, int mcts_simulations, int cpuct, Residual_CNN model) : base(name, state_size, action_size) { this.name = name; this.state_size = state_size; this.action_size = action_size; this.cpuct = cpuct; this.MCTSsimulations = mcts_simulations; this.model = model; this.mcts = null; }