super(mapEnvironment.getMap(), mapEnvironment, search, goalTests);
}
@Override
protected Problem formulateProblem(Object goal) {
BidirectionalMapProblem problem =
(BidirectionalMapProblem) super.formulateProblem(goal);
Problem result = new Problem(
problem.getInitialState(),
problem.getActionsFunction(),
problem.getResultFunction(),
new DefaultGoalTest((String) goal) {
@Override
public boolean isGoalState(Object state) {
visitedStates.add(state);
return super.isGoalState(state);
}
},
problem.getStepCostFunction());
return result;
}