gsim.core.objects
Interface BehaviourIF

All Superinterfaces:
java.io.Serializable

public interface BehaviourIF
extends java.io.Serializable

The BehaviourIF class is the interface representing both behaviour frames and instances.

Author:
Stephan

Method Summary
 void addOrSetAction(ActionIF action)
          Adds or updates an action of this behaviour.
 void addOrSetRLActionNode(RLActionNodeIF node)
          Adds or updates an RLActionNodeIF of this behaviour.
 void addOrSetRule(RuleIF rule)
          Adds or sets a RuleIF of this behaviour
 ActionIF createAction(java.lang.String name, java.lang.String cls)
          Creates an action.
 RLActionNodeIF createRLActionNode(java.lang.String name)
          Creates an RLActionNodeIF.
 RuleIF createRule(java.lang.String name)
          Creates a RuleIF.
 ActionIF getAction(java.lang.String name)
          Gets the ActionIF with the specified name.
 ActionIF[] getAvailableActions()
          Gets all ActionIF's of this behaviour.
 int getMaxNodes()
          Gets the maximum possible number of nodes that the BRA process can expand.
 double getRevaluationProb()
          Gets the probability with which existing BRA paths become re-activated.
 double getRevisitCostFraction()
          Gets the cost (zeta) that is used by BRA to determine whether a state successor should be expanded or not.
 RLActionNodeIF getRLActionNode(java.lang.String name)
          Get an RLActionNodeIF with the specified name.
 RLActionNodeIF[] getRLActionNodes()
          Gets all RLActionNodeIF's associated with this behaviour.
 RuleIF getRule(java.lang.String name)
          Gets the RuleIF with the specified name.
 RuleIF[] getRules()
          Gets all RuleIF's associated with this behaviour.
 int getUpdateInterval()
          Gets the interval m with which nodes in the BRA process are updated.
 boolean isDeclaredRLNode(java.lang.String nodeName)
          Checks whether the RLActionNodeIF with the specified name was declared in this level of the inheritance hierarchy.
 boolean isDeclaredRule(java.lang.String ruleName)
          Checks whether the RuleIF with the specified name was declared in this level of the inheritance hierarchy.
 void removeRLActionNode(java.lang.String name)
          Removes the RLActionNodeIF with the specified name from this behaviour.
 void removeRule(java.lang.String name)
          Removes the RuleIF with the specified name from this behaviour.
 void setMaxNodes(int n)
          Sets the maximum number of nodes that BRA is allowed to expand.
 void setRevaluationProb(double p)
          Sets the probability with which existing BRA paths become re-activated.
 void setRevisitCostFraction(double c)
          Sets the cost (zeta), 0 < cost < 1, that is used by BRA to determine whether a state successor should be expanded or not.
 void setUpdateInterval(int n)
          Set the interval (timesteps) at which BRA evaluates new expansions (Note: Because of hardcoded delete cycle, this will also affect when nodes become deleted).
 

Method Detail

addOrSetAction

void addOrSetAction(ActionIF action)
                    throws GSimObjectException
Adds or updates an action of this behaviour.

Parameters:
action - the action
Throws:
GSimObjectException

addOrSetRLActionNode

void addOrSetRLActionNode(RLActionNodeIF node)
                          throws GSimObjectException
Adds or updates an RLActionNodeIF of this behaviour.

Parameters:
node - the RLNode
Throws:
GSimObjectException

addOrSetRule

void addOrSetRule(RuleIF rule)
                  throws GSimObjectException
Adds or sets a RuleIF of this behaviour

Parameters:
rule - the rule
Throws:
GSimObjectException

createAction

ActionIF createAction(java.lang.String name,
                      java.lang.String cls)
                      throws GSimObjectException
Creates an action.

Parameters:
name - name of the action
cls - fully qualified name of the java class that should be executed when the action gets activated
Returns:
the action
Throws:
GSimObjectException

createRLActionNode

RLActionNodeIF createRLActionNode(java.lang.String name)
                                  throws GSimObjectException
Creates an RLActionNodeIF.

Parameters:
name -
Returns:
the node
Throws:
GSimObjectException

createRule

RuleIF createRule(java.lang.String name)
                  throws GSimObjectException
Creates a RuleIF.

Parameters:
name -
Returns:
the rule
Throws:
GSimObjectException

getAction

ActionIF getAction(java.lang.String name)
                   throws GSimObjectException
Gets the ActionIF with the specified name.

Parameters:
name - name of the action
Returns:
the action
Throws:
GSimObjectException

getAvailableActions

ActionIF[] getAvailableActions()
                               throws GSimObjectException
Gets all ActionIF's of this behaviour.

Returns:
list of actions
Throws:
GSimObjectException

getMaxNodes

int getMaxNodes()
                throws GSimObjectException
Gets the maximum possible number of nodes that the BRA process can expand.

Returns:
the maximum allowed number of nodes
Throws:
GSimObjectException

getRevaluationProb

double getRevaluationProb()
                          throws GSimObjectException
Gets the probability with which existing BRA paths become re-activated.

Returns:
the probability value
Throws:
GSimObjectException

getRevisitCostFraction

double getRevisitCostFraction()
                              throws GSimObjectException
Gets the cost (zeta) that is used by BRA to determine whether a state successor should be expanded or not. The smaller this parameter, the smaller the likelihood that nodes that were already expanded, are expanded again in the future.

Returns:
the cost parameter value.
Throws:
GSimObjectException

getRLActionNode

RLActionNodeIF getRLActionNode(java.lang.String name)
                               throws GSimObjectException
Get an RLActionNodeIF with the specified name.

Parameters:
name - the name of the node
Returns:
the node
Throws:
GSimObjectException

getRLActionNodes

RLActionNodeIF[] getRLActionNodes()
                                  throws GSimObjectException
Gets all RLActionNodeIF's associated with this behaviour.

Returns:
list of nodes
Throws:
GSimObjectException

getRule

RuleIF getRule(java.lang.String name)
               throws GSimObjectException
Gets the RuleIF with the specified name.

Parameters:
name -
Returns:
the rule
Throws:
GSimObjectException

getRules

RuleIF[] getRules()
                  throws GSimObjectException
Gets all RuleIF's associated with this behaviour.

Returns:
list of rules
Throws:
GSimObjectException

getUpdateInterval

int getUpdateInterval()
                      throws GSimObjectException
Gets the interval m with which nodes in the BRA process are updated. Note: The delete cycle is hardcoded at round(m - 1/4m).

Returns:
the interval
Throws:
GSimObjectException

isDeclaredRLNode

boolean isDeclaredRLNode(java.lang.String nodeName)
                         throws GSimObjectException
Checks whether the RLActionNodeIF with the specified name was declared in this level of the inheritance hierarchy.

Parameters:
nodeName - the name of the node
Returns:
true if declared, false otherwise
Throws:
GSimObjectException

isDeclaredRule

boolean isDeclaredRule(java.lang.String ruleName)
                       throws GSimObjectException
Checks whether the RuleIF with the specified name was declared in this level of the inheritance hierarchy.

Parameters:
ruleName -
Returns:
true if declared, false otherwise
Throws:
GSimObjectException

removeRLActionNode

void removeRLActionNode(java.lang.String name)
                        throws GSimObjectException
Removes the RLActionNodeIF with the specified name from this behaviour.

Parameters:
name - the name of the node
Throws:
GSimObjectException

removeRule

void removeRule(java.lang.String name)
                throws GSimObjectException
Removes the RuleIF with the specified name from this behaviour.

Parameters:
name - then name of the rule
Throws:
GSimObjectException

setMaxNodes

void setMaxNodes(int n)
                 throws GSimObjectException
Sets the maximum number of nodes that BRA is allowed to expand.

Parameters:
n - the maximum number of nodes
Throws:
GSimObjectException

setRevaluationProb

void setRevaluationProb(double p)
                        throws GSimObjectException
Sets the probability with which existing BRA paths become re-activated.

Parameters:
p - the probability
Throws:
GSimObjectException

setRevisitCostFraction

void setRevisitCostFraction(double c)
                            throws GSimObjectException
Sets the cost (zeta), 0 < cost < 1, that is used by BRA to determine whether a state successor should be expanded or not. The smaller this parameter, the smaller the likelihood that nodes that were already expanded, are expanded again in the future.

Parameters:
c - the cost parameter
Throws:
GSimObjectException

setUpdateInterval

void setUpdateInterval(int n)
                       throws GSimObjectException
Set the interval (timesteps) at which BRA evaluates new expansions (Note: Because of hardcoded delete cycle, this will also affect when nodes become deleted).

Parameters:
n - the interval
Throws:
GSimObjectException