Orbital library

orbital.algorithm.template
Class GeneralSearchProblem.Transition

java.lang.Object
  extended by orbital.algorithm.template.GeneralSearchProblem.Transition
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, MarkovDecisionProblem.Transition, TransitionModel.Transition
Enclosing interface:
GeneralSearchProblem

public static class GeneralSearchProblem.Transition
extends java.lang.Object
implements MarkovDecisionProblem.Transition, java.io.Serializable

Represents an option node during a search problem.

An option node is a tuple ⟨a,c⟩∈A×R of an action performed to reach a state sʹ from a state s, and the immediate action cost.

See Also:
Serialized Form
Invariants:
getAction()∈A(s)
Stereotype:
Structure

Constructor Summary
GeneralSearchProblem.Transition(java.lang.Object action, double cost)
          Deprecated. convenience constructor, prefer to use ValueFactory.valueOf(double)..
GeneralSearchProblem.Transition(java.lang.Object action, Real cost)
          Create a new option ⟨a,c⟩.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares options according to their cost.
 java.lang.Object getAction()
          Get the action.
 Real getCost()
          Get the cost of taking the action leading to this transition.
 Scalar getProbability()
          1 since deterministic transition.
protected  void setAction(java.lang.Object action)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface orbital.algorithm.template.TransitionModel.Transition
equals, hashCode
 

Constructor Detail

GeneralSearchProblem.Transition

public GeneralSearchProblem.Transition(java.lang.Object action,
                                       Real cost)
Create a new option ⟨a,c⟩.

Parameters:
action - the applicable action a∈A to reach the state sʹ.
cost - the immediate action cost c(s,a) of the action performed to reach the state sʹ.

GeneralSearchProblem.Transition

public GeneralSearchProblem.Transition(java.lang.Object action,
                                       double cost)
Deprecated. convenience constructor, prefer to use ValueFactory.valueOf(double)..

Method Detail

getAction

public java.lang.Object getAction()
Get the action.

Returns:
the action a performed to reach the state sʹ.

setAction

protected void setAction(java.lang.Object action)

getCost

public Real getCost()
Description copied from interface: MarkovDecisionProblem.Transition
Get the cost of taking the action leading to this transition.

Note: Since c:S×A→R is a function, the cost should only depend on the action a taken, and the state s in which it was taken, not the actual outcome (which is unknown a priori). Otherwise, subset construction would not be applicable, etc.

Specified by:
getCost in interface MarkovDecisionProblem.Transition
Returns:
c(s,a) the cost of taking the action a∈A(s) that took us here from state s∈S.

getProbability

public final Scalar getProbability()
1 since deterministic transition.

Specified by:
getProbability in interface TransitionModel.Transition
Returns:
the transition probability p∈[0,1] of taking this transition.

compareTo

public int compareTo(java.lang.Object o)
Compares options according to their cost.

Specified by:
compareTo in interface java.lang.Comparable
Specified by:
compareTo in interface TransitionModel.Transition

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.