Class BstarBasicDB
java.lang.Object
algorithm.BstarBasicDB
- All Implemented Interfaces:
SearchAlgorithm,SearchAlgorithm.SearchWithTree
Disprove-Best B*, as described in the report https://github.com/Pascalos99/ReportNewAdvancesInBstar/blob/main/Anema2025.pdf
-
Nested Class Summary
Nested classes/interfaces inherited from interface algorithm.SearchAlgorithm
SearchAlgorithm.Limits, SearchAlgorithm.SearchResult<N extends GameTreeNode<N,P>, P extends IGamePosition<P>>, SearchAlgorithm.SearchWithTable, SearchAlgorithm.SearchWithTree -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBstarBasicDB(StopCondition additional_stopcondition, StrategyFunction strategyFunction, double effort_ratio) BstarBasicDB(StrategyFunction strategyFunction, double effort_ratio) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidexpectIncorrectBounds(boolean set) defaults totrue<P extends IGamePosition<P>>
SearchAlgorithm.SearchResult<?, P> search(P root, Duration time_limit, SearchAlgorithm.Limits space_limit, MetricKeeper... metrics) Initiates the search of the provided game tree with a given time limit and spatial limit.<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) Initiates the search of the provided game tree with a given time limit and spatial limit.<N extends GameTreeNode<N,P>, P extends IGamePosition<P>>
NselectNext(N current, boolean provebest, MetricKeeper... metrics) <N extends GameTreeNode<N,P>, P extends IGamePosition<P>>
NselectNextDB(N current, double low, double high, MetricKeeper... metrics) voidsetFilterTerminalNodes(boolean set) voidsetMaxRootlessUpdates(long maxRootless) voidsetRandomChance(double probability) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface algorithm.SearchAlgorithm
search, search, searchMethods inherited from interface algorithm.SearchAlgorithm.SearchWithTree
searchWithTree, searchWithTree, searchWithTree
-
Field Details
-
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
-
-
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 totrue- 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:SearchAlgorithmInitiates the search of the provided game tree with a given time limit and spatial limit.- Specified by:
searchin interfaceSearchAlgorithm- Type Parameters:
P- The type ofIGamePositionwhich represents the type of game to be searched- Parameters:
root- root of the tree to be searchedtime_limit- maximum time spent in the algorithmspace_limit- maximum node expansions, evaluations, and nodes saved in memory used by the algorithmmetrics- an array ofMetricKeeperobjects 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.SearchWithTreeInitiates the search of the provided game tree with a given time limit and spatial limit.- Specified by:
searchWithTreein interfaceSearchAlgorithm.SearchWithTree- Type Parameters:
N- The type ofGameTreeNodewhich is used for executing the searchP- The type ofIGamePositionwhich represents the type of game to be searched- Parameters:
root- root of the tree to be searchedtime_limit- maximum time spent in the algorithmspace_limit- maximum node expansions, evaluations, and nodes saved in memory used by the algorithmmetrics- an array ofMetricKeeperobjects 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)
-