Class BstarSquaredDB

java.lang.Object
algorithm.BstarSquaredDB
All Implemented Interfaces:
SearchAlgorithm

public class BstarSquaredDB extends Object implements SearchAlgorithm
A B*² implementation which uses Disprove-Best B* at the first-level search only.
  • Constructor Details

    • BstarSquaredDB

      public BstarSquaredDB(double effort_ratio, StrategyFunction... strategyFunctions)
      The first evaluation function provided corresponds to the function used by the first-level search. The number of strategy functions provided corresponds to the number of levels of search, with a minimum of two.
      Parameters:
      effort_ratio - The effort ratio of the Disprove-Best B* engine at the first-level search. Typically set between 1 and 2 divided by the branching factor of the tree.
      strategyFunctions - The list of strategy functions to apply at the root of a leveled search, including the first-level search.
    • BstarSquaredDB

      public BstarSquaredDB(double effort_ratio, StrategyFunction L1_strategyFunction)
      Uses the default StrategyFunction.PROVEBEST strategy function for L2 search.
      Parameters:
      L1_strategyFunction - The strategy function to be used for L1 search.
  • Method Details

    • expectIncorrectBounds

      public void expectIncorrectBounds(boolean set)
      defaults to false
      Parameters:
      set -
    • setLevel

      void setLevel(int newLevel)
    • search

      public <P extends IGamePosition<P>> SearchAlgorithm.SearchResult<?,P> search(P root, Duration time_limit, SearchAlgorithm.Limits space_limit, MetricKeeper... metrics)
      Description copied from interface: SearchAlgorithm
      Initiates the search of the provided game tree with a given time limit and spatial limit.
      Specified by:
      search in interface SearchAlgorithm
      Type Parameters:
      P - The type of IGamePosition which represents the type of game to be searched
      Parameters:
      root - root of the tree to be searched
      time_limit - maximum time spent in the algorithm
      space_limit - maximum node expansions, evaluations, and nodes saved in memory used by the algorithm
      metrics - an array of MetricKeeper objects to keep track of evaluations, expansions, and node storage performed during the search, can be empty
      Returns:
      result from the search