ai.search
Interface IntCostReversibleAction

All Superinterfaces:
IntCostAction

public interface IntCostReversibleAction
extends IntCostAction

Instances implementing this interface represent a reversible action that can be used to transform one search state into another. An action is considered to be reversible if there is another action that will undo the effects of the original action if applied immediately afterwards.

Note: reversible actions are a necessary prerequisite for search problems that are to be solved using bidirectional search as performed by a BidirBFSearcherForIntCostFn.

Author:
Gerhard Wickler
See Also:
SearchStateForIntCostFn

Method Summary
 IntCostReversibleAction getReverseAction()
           This function can be used to obtain the action that represents the reversing action to this action.
 boolean reverseAction(IntCostReversibleAction action)
           This function tests whether this and the given action represent reverse actions.
 
Methods inherited from interface ai.search.IntCostAction
getCost, getStateClass
 

Method Detail

getReverseAction

IntCostReversibleAction getReverseAction()

This function can be used to obtain the action that represents the reversing action to this action.

Returns:
the IntCostReversibleAction that reverses the effects of this reversible action

reverseAction

boolean reverseAction(IntCostReversibleAction action)

This function tests whether this and the given action represent reverse actions.

Parameters:
action - a IntCostReversibleAction that potentially reverses the effects of this reversible action
Returns:
true if and only if the two actions undo each other