Class LeastInformedHeuristicFunction
java.lang.Object
com.aoindustries.aoserv.cluster.optimize.LeastInformedHeuristicFunction
- All Implemented Interfaces:
HeuristicFunction
This simply returns g if the cluster is optimal or g+1 if it is optimal.
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getHeuristic
(ClusterConfiguration clusterConfiguration, int g) Estimates the number of moves to an optimal state.
-
Constructor Details
-
LeastInformedHeuristicFunction
public LeastInformedHeuristicFunction()
-
-
Method Details
-
getHeuristic
Description copied from interface:HeuristicFunction
Estimates the number of moves to an optimal state. If it uses the providedg
g(n) it will result in Algorithm A. If it also always uses h(n) <= h*(n) it will result in Algorithm A*.- Specified by:
getHeuristic
in interfaceHeuristicFunction
- Parameters:
clusterConfiguration
- TheClusterConfiguration
representing the current state.g
- The number of moves already made.- Returns:
- The estimated number of moves to an optimal state
-