All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.search.informed.GreedyBestFirstSearch Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.search.informed;

import aima.core.search.framework.evalfunc.HeuristicFunction;
import aima.core.search.framework.qsearch.QueueSearch;

/**
 * Artificial Intelligence A Modern Approach (3rd Edition): page 92.
*
* Greedy best-first search tries to expand the node that is closest to the * goal, on the grounds that this is likely to lead to a solution quickly. Thus, * it evaluates nodes by using just the heuristic function; that is, f(n) = h(n) * * @author Ravi Mohan * @author Mike Stampone */ public class GreedyBestFirstSearch extends BestFirstSearch { /** * Constructs a greedy best-first search from a specified search space * exploration strategy and a heuristic function. * * @param impl * a search space exploration strategy (e.g. TreeSearch, * GraphSearch). * @param hf * a heuristic function h(n), which estimates the * cheapest path from the state at node n to a goal * state. */ public GreedyBestFirstSearch(QueueSearch impl, HeuristicFunction hf) { super(impl, new GreedyBestFirstEvaluationFunction(hf)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy