Class BstarSquaredSimpleMax
java.lang.Object
algorithm.BstarSquaredSimpleMax
- All Implemented Interfaces:
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.
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBstarSquaredSimpleMax.L1Position<P extends IGamePosition<P>>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 -
Constructor Summary
ConstructorsConstructorDescriptionBstarSquaredSimpleMax(StrategyFunction L1_strategyFunction) Uses the defaultStrategyFunction.PROVEBESTstrategy function for the second-level search.BstarSquaredSimpleMax(StrategyFunction... strategyFunctions) The first evaluation function provided corresponds to the function used by the first-level search. -
Method Summary
Modifier and TypeMethodDescriptionvoidexpectIncorrectBounds(boolean set) defaults tofalse<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.(package private) voidsetLevel(int newLevel) 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, search
-
Constructor Details
-
BstarSquaredSimpleMax
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
Uses the defaultStrategyFunction.PROVEBESTstrategy 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 tofalse- 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: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
-