ai.planning
Interface Plan<A>

Type Parameters:
A - the class for atomic elements in a state
All Known Subinterfaces:
SequentialPlan<A>
All Known Implementing Classes:
SequentialPlan, SequentialPlan

public interface Plan<A>

This class represents a Plan which is a collection of Actions that are somehow organised. A Plan is a solution to a planning problem if and only if its execution in the initial state results in a state in which the goal is satisfied.

Author:
Gerhard Wickler

Method Summary
 WorldState<A> applyIn(WorldState<A> istate)
           This function computes a new WorldState that is the result of applying this Plan in the given state.
 SequentialPlan<A> asSequentialPlan()
           This function returns a linearised, total-order version of this Plan.
 Domain<A> getDomain()
           This function retrieves the Domain which contains the definitions of the ActionTypes of which the Actions in this Plan are instances.
 boolean solves(Problem<A> p)
           This function tests whether this Plan constitutes a solution to the given Problem.
 

Method Detail

asSequentialPlan

SequentialPlan<A> asSequentialPlan()

This function returns a linearised, total-order version of this Plan.

Returns:
a SequentialPlan that corresponds to this Plan

getDomain

Domain<A> getDomain()

This function retrieves the Domain which contains the definitions of the ActionTypes of which the Actions in this Plan are instances.

Returns:
the Domain for which this Plan was created

applyIn

WorldState<A> applyIn(WorldState<A> istate)

This function computes a new WorldState that is the result of applying this Plan in the given state. If this Plan is not applicable in an intermediate state, the result will be null.

Parameters:
istate - the WorldState in which the SequentialPlan is to be applied
Returns:
a new WorldState that is the result of the state transition function applied to this WorldState

solves

boolean solves(Problem<A> p)

This function tests whether this Plan constitutes a solution to the given Problem. This is true iff this Plan applied to the initial state results in a state that satisfies the goal of the Problem.

Parameters:
p - the Problem to which this Plan be a solution
Returns:
true iff this Plan is a solution plan for the given problem