/// <summary>
 /// Constructs a new instance without time or iterative restrictions.
 /// </summary>
 /// <param name="selectionStrategy">The selection strategy.</param>
 /// <param name="expansionStrategy">The expansion strategy.</param>
 /// <param name="backPropagationStrategy">The back propagation strategy.</param>
 /// <param name="finalNodeSelectionStrategy">The final node selection strategy.</param>
 /// <param name="evaluationStrategy">The state evaluation strategy.</param>
 /// <param name="solutionStrategy">The solution strategy.</param>
 /// <param name="time">[Optional] The time budget for this search. Default value is <see cref="Constants.NO_LIMIT_ON_THINKING_TIME"/>.</param>
 /// <param name="iterations">[Optional] The iteration budget for this search. Default value is <see cref="Constants.NO_LIMIT_ON_ITERATIONS"/>.</param>
 protected TreeSearch(ITreeSelection <D, P, A, S, Sol> selectionStrategy, ITreeExpansion <D, P, A, S, Sol> expansionStrategy, ITreeBackPropagation <D, P, A, S, Sol> backPropagationStrategy, ITreeFinalNodeSelection <D, P, A, S, Sol> finalNodeSelectionStrategy, IStateEvaluation <D, P, A, S, Sol, TreeSearchNode <P, A> > evaluationStrategy, ISolutionStrategy <D, P, A, S, Sol, TreeSearchNode <P, A> > solutionStrategy, long time = Constants.NO_LIMIT_ON_THINKING_TIME, int iterations = Constants.NO_LIMIT_ON_ITERATIONS)
 {
     SelectionStrategy          = selectionStrategy;
     ExpansionStrategy          = expansionStrategy;
     BackPropagationStrategy    = backPropagationStrategy;
     FinalNodeSelectionStrategy = finalNodeSelectionStrategy;
     EvaluationStrategy         = evaluationStrategy;
     SolutionStrategy           = solutionStrategy;
     Time       = time;
     Iterations = iterations;
 }
示例#2
0
 /// <summary>
 /// Constructs a new instance.
 /// </summary>
 /// <param name="selectionStrategy">The selection strategy.</param>
 /// <param name="expansionStrategy">The expansion strategy.</param>
 /// <param name="backPropagationStrategy">The back propagation strategy.</param>
 /// <param name="finalNodeSelectionStrategy">The final node selection strategy.</param>
 /// <param name="evaluationStrategy">The state evaluation strategy.</param>
 /// <param name="solutionStrategy">The solution strategy.</param>
 /// <param name="playoutStrategy">The playout strategy.</param>
 /// <param name="time">The amount of time allowed for the search.</param>
 /// <param name="iterations">The amount of iterations allowed for the search.</param>
 public FlatMCS(ITreeSelection <D, P, A, S, Sol> selectionStrategy,
                ITreeExpansion <D, P, A, S, Sol> expansionStrategy,
                ITreeBackPropagation <D, P, A, S, Sol> backPropagationStrategy,
                ITreeFinalNodeSelection <D, P, A, S, Sol> finalNodeSelectionStrategy,
                IStateEvaluation <D, P, A, S, Sol, TreeSearchNode <P, A> > evaluationStrategy,
                ISolutionStrategy <D, P, A, S, Sol, TreeSearchNode <P, A> > solutionStrategy,
                IPlayoutStrategy <D, P, A, S, Sol> playoutStrategy, long time, int iterations) : base(
         selectionStrategy, expansionStrategy, backPropagationStrategy, finalNodeSelectionStrategy,
         evaluationStrategy, solutionStrategy, time, iterations)
 {
     PlayoutStrategy = playoutStrategy;
 }
示例#3
0
 /// <summary>
 /// Constructs a new instance.
 /// </summary>
 /// <param name="selectionStrategy">The selection strategy.</param>
 /// <param name="expansionStrategy">The expansion strategy.</param>
 /// <param name="backPropagationStrategy">The back propagation strategy.</param>
 /// <param name="finalNodeSelectionStrategy">The final node selection strategy.</param>
 /// <param name="evaluationStrategy">The state evaluation strategy.</param>
 /// <param name="explorationStrategy">The exploration strategy.</param>
 /// <param name="solutionStrategy">The solution strategy.</param>
 /// <param name="samplingStrategy">The sampling strategy.</param>
 /// <param name="playoutStrategy">The playout strategy.</param>
 /// <param name="time">The amount of time allowed for the search.</param>
 /// <param name="iterations">The amount of iterations allowed for the search.</param>
 /// <param name="globalPolicy">The global policy.</param>
 public NMCTS(ITreeSelection <D, P, A, S, Sol> selectionStrategy,
              ITreeExpansion <D, P, A, S, Sol> expansionStrategy,
              ITreeBackPropagation <D, P, A, S, Sol> backPropagationStrategy,
              ITreeFinalNodeSelection <D, P, A, S, Sol> finalNodeSelectionStrategy,
              IStateEvaluation <D, P, A, S, Sol, TreeSearchNode <P, A> > evaluationStrategy,
              IExplorationStrategy <D, P, A, S, Sol> explorationStrategy,
              ISolutionStrategy <D, P, A, S, Sol, TreeSearchNode <P, A> > solutionStrategy,
              ISamplingStrategy <P, A> samplingStrategy,
              IPlayoutStrategy <D, P, A, S, Sol> playoutStrategy, long time, int iterations, double globalPolicy) :
     base(selectionStrategy, expansionStrategy, backPropagationStrategy, finalNodeSelectionStrategy,
          evaluationStrategy, solutionStrategy, time, iterations)
 {
     ExplorationStrategy = explorationStrategy;
     SamplingStrategy    = samplingStrategy;
     PlayoutStrategy     = playoutStrategy;
     PolicyGlobal        = globalPolicy;
 }