public class MapStepCostFunction extends java.lang.Object implements StepCostFunction
| Constructor and Description |
|---|
MapStepCostFunction(Map map) |
| Modifier and Type | Method and Description |
|---|---|
double |
c(java.lang.Object fromCurrentState,
Action action,
java.lang.Object toNextState)
Calculate the step cost of taking action a in state s to reach state s'.
|
public MapStepCostFunction(Map map)
public double c(java.lang.Object fromCurrentState,
Action action,
java.lang.Object toNextState)
StepCostFunctionc in interface StepCostFunctionfromCurrentState - the state from which action a is to be performed.action - the action to be taken.toNextState - the state reached by taking the action.