ai.planning.strips.ssp
Class GndFwdSearchPlanner

java.lang.Object
  extended by ai.planning.strips.ssp.GndFwdSearchPlanner

public class GndFwdSearchPlanner
extends java.lang.Object

This class is a very simple planner that works by searching the space of WorldStates forward from the initial state.

Author:
Gerhard Wickler

Nested Class Summary
static class GndFwdSearchPlanner.DefaultHeuristic
           
 
Field Summary
protected  boolean allowComplementaryEffects
          whether the planner should consider Actions with inconsistent effects
protected  Problem problem
          the Problem on which this planner is working
protected  ai.search.informed.BestFirstSearcherForIntCostFn<ai.planning.strips.ssp.GndFwdSearchPlanner.SearchState> searcher
          the SearchEngine that will be used to search for a Plan
 
Constructor Summary
GndFwdSearchPlanner(Problem problem)
           This constructor creates a new planner that will search for a solution Plan for the given Problem.
GndFwdSearchPlanner(Problem problem, java.lang.Class<? extends ai.search.informed.BestFirstSearcherForIntCostFn> seClass, java.lang.Class<? extends ai.search.informed.IntCostHeuristic> hClass, ai.search.SearchEngine.GraphType gType, long limit)
           
 
Method Summary
protected  GndFwdSearchPlanner clone()
           This class does not support cloning and an Exception will be thrown if this method is called.
 ai.search.informed.BestFirstSearcherForIntCostFn getSearcher()
           This function can be used to obtain the SearchEngine used by this planner.
static void main(java.lang.String[] args)
           
 SequentialPlan nextPlan()
           This function starts the search for a Plan.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

problem

protected Problem problem
the Problem on which this planner is working


searcher

protected ai.search.informed.BestFirstSearcherForIntCostFn<ai.planning.strips.ssp.GndFwdSearchPlanner.SearchState> searcher
the SearchEngine that will be used to search for a Plan


allowComplementaryEffects

protected boolean allowComplementaryEffects
whether the planner should consider Actions with inconsistent effects

Constructor Detail

GndFwdSearchPlanner

public GndFwdSearchPlanner(Problem problem)

This constructor creates a new planner that will search for a solution Plan for the given Problem. Note that the search for a Plan must be started using the function nextPlan().

Parameters:
problem - the Problem to be solved

GndFwdSearchPlanner

public GndFwdSearchPlanner(Problem problem,
                           java.lang.Class<? extends ai.search.informed.BestFirstSearcherForIntCostFn> seClass,
                           java.lang.Class<? extends ai.search.informed.IntCostHeuristic> hClass,
                           ai.search.SearchEngine.GraphType gType,
                           long limit)
                    throws java.lang.IllegalArgumentException,
                           java.lang.SecurityException,
                           java.lang.InstantiationException,
                           java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException,
                           java.lang.NoSuchMethodException
Throws:
java.lang.IllegalArgumentException
java.lang.SecurityException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
Method Detail

clone

protected GndFwdSearchPlanner clone()
                             throws java.lang.CloneNotSupportedException

This class does not support cloning and an Exception will be thrown if this method is called.

Overrides:
clone in class java.lang.Object
Returns:
nothing
Throws:
java.lang.CloneNotSupportedException - will be thrown

getSearcher

public ai.search.informed.BestFirstSearcherForIntCostFn getSearcher()

This function can be used to obtain the SearchEngine used by this planner. This is useful if further configuration of the SearchEngine is required before the planning process is started or if information about the search is to be extracted from the SearchEngine after the planning.

Returns:
the SearchEngine used by this planner

nextPlan

public SequentialPlan nextPlan()

This function starts the search for a Plan. If no more Plans can be found by the underlying SearchEngine this function returns null. Otherwise it will return a Plan that is a solution to the planning problem given to this planner at through the constructor.

Returns:
the next solution plan found by the SearchEngine used

main

public static void main(java.lang.String[] args)