ai.search
Interface DoubleCostReversibleAction

All Superinterfaces:
DoubleCostAction

public interface DoubleCostReversibleAction
extends DoubleCostAction

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 BidirBFSearcherForDoubleCostFn.

Author:
Gerhard Wickler
See Also:
SearchStateForDoubleCostFn

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

Method Detail

getReverseAction

DoubleCostReversibleAction getReverseAction()

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

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

reverseAction

boolean reverseAction(DoubleCostReversibleAction action)

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

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