if (goalState == null) // if we can't find one
{
infoOutput.println("EHC failed, using best-first search, with all actions");
// create a Best-First Searcher
BestFirstSearch BFS = new BestFirstSearch(initialState);
// ... change to using the 'all actions' neighbourhood (a null filter, as it removes nothing)
BFS.setFilter(NullFilter.getInstance());
// and use that
goalState = BFS.search();
}
return goalState; // return the plan
}