Class BstarBasicDB

java.lang.Object
algorithm.BstarBasicDB
All Implemented Interfaces:
SearchAlgorithm, SearchAlgorithm.SearchWithTree

public class BstarBasicDB extends Object implements SearchAlgorithm.SearchWithTree
Disprove-Best B*, as described in the report https://github.com/Pascalos99/ReportNewAdvancesInBstar/blob/main/Anema2025.pdf
  • Field Details

    • randomizer

      public static Random randomizer
    • hard_proof_counter

      public static long hard_proof_counter
    • easy_proof_counter

      public static long easy_proof_counter
  • Constructor Details

    • BstarBasicDB

      public BstarBasicDB(StopCondition additional_stopcondition, StrategyFunction strategyFunction, double effort_ratio)
    • BstarBasicDB

      public BstarBasicDB(StrategyFunction strategyFunction, double effort_ratio)
  • Method Details

    • setMaxRootlessUpdates

      public void setMaxRootlessUpdates(long maxRootless)
    • disableMaxRootlessUpdates

      public void disableMaxRootlessUpdates()
    • setFilterTerminalNodes

      public void setFilterTerminalNodes(boolean set)
    • setRandomChance

      public void setRandomChance(double probability)
    • disableRandomChance

      public void disableRandomChance()
    • expectIncorrectBounds

      public void expectIncorrectBounds(boolean set)
      defaults to true
      Parameters:
      set -
    • 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
    • searchWithTree

      public <N extends GameTreeNode<N,P>, P extends IGamePosition<P>> SearchAlgorithm.SearchResult<N,P> searchWithTree(N root, Duration time_limit, SearchAlgorithm.Limits space_limit, MetricKeeper... metrics)
      Description copied from interface: SearchAlgorithm.SearchWithTree
      Initiates the search of the provided game tree with a given time limit and spatial limit.
      Specified by:
      searchWithTree in interface SearchAlgorithm.SearchWithTree
      Type Parameters:
      N - The type of GameTreeNode which is used for executing the search
      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
    • selectNext

      public <N extends GameTreeNode<N,P>, P extends IGamePosition<P>> N selectNext(N current, boolean provebest, MetricKeeper... metrics)
    • selectNextDB

      public <N extends GameTreeNode<N,P>, P extends IGamePosition<P>> N selectNextDB(N current, double low, double high, MetricKeeper... metrics)