Package libai.search

Interface Search

  • All Known Implementing Classes:
    AStar, BFS, DFS

    public interface Search
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      State search​(State init)
      Do a search from the init state, until the current state becomes a solution (State.isSolution()) If the algorithm finds a solution return the current state as the solution.
    • Method Detail

      • search

        State search​(State init)
        Do a search from the init state, until the current state becomes a solution (State.isSolution()) If the algorithm finds a solution return the current state as the solution. That internal representation of the state must contain all the information needed to reconstruct the path or any other operation needed by the user. If there is no solution this method must return null.
        Parameters:
        init - Initial state of the search
        Returns:
        The final state that become a solution or null if there is no solution.