Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 3
0
 /// <summary>Initializes a new <see cref="UniformCostSearch{S,A}"/>.</summary>
 public UniformCostSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, false)
 {
 }
Esempio n. 4
0
 /// <summary>Initializes a new <see cref="IterativeDeepeningAStarSearch{S,A}"/>.</summary>
 public IterativeDeepeningAStarSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
Esempio n. 5
0
 /// <summary>Initializes a new <see cref="GreedyBestFirstSearch{S,A}"/>.</summary>
 public GreedyBestFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
Esempio n. 6
0
 /// <summary>Initializes a new <see cref="DepthFirstSearch{S,A}"/>.</summary>
 public DepthFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, int.MaxValue)
 {
 }
Esempio n. 7
0
 /// <summary>Initializes a new <see cref="DepthBasedSearch{S,A}"/>.</summary>
 protected DepthBasedSearch(IGraphSearchable <StateType, ActionType> problem, bool usesHeuristic) : base(problem, usesHeuristic)
 {
 }
Esempio n. 8
0
 /// <summary>Initializes a new <see cref="BreadthFirstSearch{S,A}"/>.</summary>
 public BreadthFirstSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, false)
 {
 }
Esempio n. 9
0
 /// <summary>Initializes a new <see cref="AStarSearch{S,A}"/>.</summary>
 public AStarSearch(IGraphSearchable <StateType, ActionType> problem) : base(problem, true)
 {
 }
Esempio n. 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;
 }