ai.planning
Interface Goal<A>

Type Parameters:
A - the class for atomic elements in a state
All Known Implementing Classes:
Goal, Goal

public interface Goal<A>

A goal is usually defined as a set of Atoms in planning. Implicitly defined is the set of goal states which are exactly those WorldStates in which the Goal is satisfied.

Author:
Gerhard Wickler

Method Summary
 java.util.Set<A> getNegativeGoals()
           This function returns the set of negative goal conditions that define this Goal.
 java.util.Set<A> getPositiveGoals()
           This function returns the set of positive goal conditions that define this Goal.
 boolean isRelevant(Action<A> action)
           This function tests whether the given Action is relevant for this Goal.
 Goal<A> regress(Action<A> action)
           This function computes a new Goal that is the result of regressing this Goal through the given Action.
 boolean satisfiedIn(WorldState<A> state)
           This function tests whether this Goal is achieved in the given state.
 

Method Detail

getPositiveGoals

java.util.Set<A> getPositiveGoals()

This function returns the set of positive goal conditions that define this Goal.

Returns:
the set of Atoms to be achieved for this Goal

getNegativeGoals

java.util.Set<A> getNegativeGoals()

This function returns the set of negative goal conditions that define this Goal.

Returns:
the set of Atoms that must not hold for this Goal to be achieved

isRelevant

boolean isRelevant(Action<A> action)

This function tests whether the given Action is relevant for this Goal.

Parameters:
action - the Action to be tested for relevance
Returns:
whether the given Action may contribute to achieving this Goal

regress

Goal<A> regress(Action<A> action)

This function computes a new Goal that is the result of regressing this Goal through the given Action. The given Action should be relevant.

Parameters:
action - the (relevant) Action used for regression in this Goal
Returns:
a new Goal that is the result of the reverse state transition function applied to this Goal

satisfiedIn

boolean satisfiedIn(WorldState<A> state)

This function tests whether this Goal is achieved in the given state.

Parameters:
state - the WorldState in which this Goal may be satisfied
Returns:
whether all the goal conditions are satisfied in the state