Ejemplo n.º 1
0
 /// <summary>
 /// Constructs the Beam search procedure.
 /// </summary>
 /// <param name="problem">Planning problem.</param>
 /// <param name="heuristic">Heuristic.</param>
 /// <param name="heap">Heap collection.</param>
 /// <param name="beamWidth">Beam width.</param>
 /// <param name="loggingEnabled">Is logging of the search enabled?</param>
 /// <param name="timeLimitOfSearch">Time limit of the search.</param>
 /// <param name="memoryLimitOfStates">Memory limit of searched nodes.</param>
 public BeamSearch(ISearchableProblem problem, ISearchableHeuristic heuristic, IHeap heap, int beamWidth, bool loggingEnabled, TimeSpan timeLimitOfSearch, long memoryLimitOfStates)
     : base(problem, heuristic, heap, loggingEnabled, timeLimitOfSearch, memoryLimitOfStates)
 {
     Candidates = new BeamSearchTransitionCandidates(problem, heuristic, beamWidth);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs the Beam search procedure.
 /// </summary>
 /// <param name="problem">Planning problem.</param>
 /// <param name="heuristic">Heuristic (if not specified, blind heuristic will be used).</param>
 /// <param name="heap">Heap collection (if not specified, red-black heap will be used).</param>
 /// <param name="beamWidth">Beam width (default width is 2).</param>
 /// <param name="loggingEnabled">Is logging of the search enabled?</param>
 public BeamSearch(ISearchableProblem problem, ISearchableHeuristic heuristic = null, IHeap heap = null, int beamWidth = 2, bool loggingEnabled = false)
     : base(problem, heuristic, heap, loggingEnabled)
 {
     Candidates = new BeamSearchTransitionCandidates(problem, heuristic, beamWidth);
 }