Class BstarSquaredSimpleMax

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

public class BstarSquaredSimpleMax extends Object implements SearchAlgorithm
This implements B*²-max with the `dispose all' bounds preservation technique and no shallow or deep irrelevance.

The additional bounds preservation techniques and the shallow and deep irrelevance stop conditions are currently implemented on a different branch, and have not been thoroughly tested. Therefore they have not been included here as of now.
  • Constructor Details

    • BstarSquaredSimpleMax

      public BstarSquaredSimpleMax(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:
      strategyFunctions - The list of strategy functions to apply at the root of a leveled search, including the first-level search.
    • BstarSquaredSimpleMax

      public BstarSquaredSimpleMax(StrategyFunction L1_strategyFunction)
      Uses the default StrategyFunction.PROVEBEST strategy function for the second-level search.
      Parameters:
      L1_strategyFunction - The strategy function to be used for the first-level 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