Uniform-cost search

From CodeCodex

[edit] Implementations

[edit] Java

Note: This package requires several dependent classes available here: Google CodeSearch: Uniform-cost search

import java.lang.*;
import java.util.*;
import aima.cs.util.*;

/**
    Uniform-cost search: redefines constructor to use priority queue
    with uniform-cost predicate.
*/


public class UniformCostSearch extends GeneralQueueSearch {

    public UniformCostSearch(State startState) {
        super(new SearchNode(startState),
              new PriorityQueue(new UniformCostPredicate()));
    }

}