///// <summary> ///// TODO: API ///// </summary> ///// <param name="playerId">the id of the player</param> ///// <param name="scoring">the scoring function of the player</param> ///// <param name="oppScoring">the scoring function of the opponent</param> ///// <param name="map">the bi-gram map</param> //public MCTSSimulator(int playerId, IScore scoring, BigramMap map) // : this(PredictionParameters.DEFAULT, playerId, scoring, map) { } ///// <summary> ///// TODO: API ///// </summary> ///// <param name="predictionParameters"></param> ///// <param name="playerId"></param> ///// <param name="scoring"></param> ///// <param name="oppScoring"></param> ///// <param name="map"></param> //public MCTSSimulator(PredictionParameters predictionParameters, int playerId, IScore scoring, BigramMap map) // : this(MCTSParameters.DEFAULT, predictionParameters, playerId, scoring, map) { } /// <summary> /// TODO: API /// </summary> /// <param name="mctsParameters"></param> /// <param name="predictionParameters"></param> /// <param name="playerId"></param> /// <param name="scoring"></param> /// <param name="oppScoring"></param> /// <param name="map"></param> //public MCTSSimulator(MCTSParameters mctsParameters, PredictionParameters predictionParameters, // int playerId, IScore scoring, BigramMap map) public MCTSSimulator(int playerId, IScore scoring, MCTSParameters mctsParameters) : base(mctsParameters) { _playerId = playerId; _scoring = scoring; _deltaTime = (_mctsParameters.SimulationTime - 2 * _mctsParameters.AggregationTime); }
public MCTSSimulatorExt(int playerId, IScore scoring, MCTSParameters mctsParameters, PredictionParameters predictionParameters, BigramMap map) : base(playerId, scoring, mctsParameters) { _predictionParameters = predictionParameters; _map = map; _oppHistory = null; _oppBoardCards = new BoardCards(); // the delta time for each simulation is: // a) depth * 2, because we simulation for every depth the opponent and the player at once // b) + 1, because we always simulation the player first _deltaTime = (_mctsParameters.SimulationTime - ((_predictionParameters.SimulationDepth * 2) + 1) * _mctsParameters.AggregationTime) / ((_predictionParameters.SimulationDepth * 2) + 1); }
/// <summary> /// Default constructor. /// </summary> /// <param name="mctsParameters">the parameters controlling the simulator</param> public AbstractMCTSSimulator(MCTSParameters mctsParameters) { _mctsParameters = mctsParameters; }