예제 #1
0
 /// <summary>Initializes a new <see cref="DepthLimitedSearch{S,A}"/>.</summary>
 public DepthLimitedSearch(IGraphSearchable <StateType, ActionType> problem, int depthLimit) : base(problem, false)
 {
     if (depthLimit < 0)
     {
         throw new ArgumentOutOfRangeException("Depth limit must not be negative.");
     }
     DepthLimit = depthLimit;
 }
예제 #2
0
 /// <summary>Initializes the graph search with a problem instance.</summary>
 protected GraphSearchBase(IGraphSearchable <StateType, ActionType> problem)
 {
     if (problem == null)
     {
         throw new ArgumentNullException();
     }
     Problem = problem;
 }
예제 #3
0
 /// <summary>Initializes a new <see cref="UniformCostSearch{S,A}"/>.</summary>
 public UniformCostSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, false)
 {
 }
예제 #4
0
 /// <summary>Initializes a new <see cref="IterativeDeepeningAStarSearch{S,A}"/>.</summary>
 public IterativeDeepeningAStarSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
예제 #5
0
 /// <summary>Initializes a new <see cref="GreedyBestFirstSearch{S,A}"/>.</summary>
 public GreedyBestFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
예제 #6
0
 /// <summary>Initializes a new <see cref="DepthFirstSearch{S,A}"/>.</summary>
 public DepthFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, int.MaxValue)
 {
 }
예제 #7
0
 /// <summary>Initializes a new <see cref="DepthBasedSearch{S,A}"/>.</summary>
 protected DepthBasedSearch(IGraphSearchable <StateType, ActionType> problem, bool usesHeuristic) : base(problem, usesHeuristic)
 {
 }
예제 #8
0
 /// <summary>Initializes a new <see cref="BreadthFirstSearch{S,A}"/>.</summary>
 public BreadthFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, false)
 {
 }
예제 #9
0
 /// <summary>Initializes a new <see cref="AStarSearch{S,A}"/>.</summary>
 public AStarSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
예제 #10
0
 /// <summary>Initializes the single-queue search base with the given problem.</summary>
 /// <param name="problem">The problem instance to be solved.</param>
 /// <param name="usesHeuristic">Determines whether heuristic information is required by the search. If not, it won't
 /// be gathered. Passing true also has the effect of disabling bidirectional searches, because bidirectional
 /// searching with heuristics is not yet implemented.
 /// </param>
 protected SingleQueueSearchBase(IGraphSearchable <StateType, ActionType> problem, bool usesHeuristic) : base(problem)
 {
     this.BidiProblem  = problem as IBidirectionallySearchable <StateType, ActionType>;
     this.useHeuristic = usesHeuristic;
 }