logger.debug("Maximum states: " + maxStates);
// Initialize candidate search policy
SearchStrategy comparator;
if (strategy.equals(CloserToOrigin.class)) {
comparator = new CloserToOrigin(minLogProbability, maxLogProbability, minStates, maxStates, weight1);
} else {
try {
comparator = (SearchStrategy) strategy.newInstance();
} catch (InstantiationException e) {
throw new IllegalArgumentException(e);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException(e);
}
}
logger.debug("Search strategy: " + comparator);
// Initialize scorer (for the output)
outputScorer = new CloserToOrigin(minLogProbability, maxLogProbability, minStates, maxStates, weight1);
logger.debug("Output scorer: " + outputScorer);
// Initialize set of candidates
candidates = new PriorityQueue<Candidate>(100, comparator);
addSubCandidates(initialCandidate);