ai.planning
Interface Action<A>

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

public interface Action<A>

An Action is an activity that may be executable by some agent. Every Action must be an instance of some ActionType.

Author:
Gerhard Wickler

Method Summary
 WorldState<A> applyIn(WorldState<A> state)
           This function computes a new WorldState that is the result of applying this Action in the given state.
 ActionType<A> getActionType()
           This function returns the ActionType of this Action.
 boolean isApplicableIn(WorldState<A> state)
           This function tests whether this Action is applicable in the given state.
 

Method Detail

getActionType

ActionType<A> getActionType()

This function returns the ActionType of this Action.

Returns:
the ActionType instantiated by this Action

isApplicableIn

boolean isApplicableIn(WorldState<A> state)

This function tests whether this Action is applicable in the given state.

Parameters:
state - the WorldState in which applicability is to be tested
Returns:
whether applying this Action in the given state results in a well-defined state

applyIn

WorldState<A> applyIn(WorldState<A> state)

This function computes a new WorldState that is the result of applying this Action in the given state. The Action should be applicable or the result of this function may not be as expected.

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