cz.cuni.amis.pogamut.episodic.decisions
Class Intention

Package class diagram package Intention
java.lang.Object
  extended by cz.cuni.amis.pogamut.episodic.decisions.Node
      extended by cz.cuni.amis.pogamut.episodic.decisions.Intention
All Implemented Interfaces:
INode, Serializable

public class Intention
extends Node
implements Serializable

Class Intention represents an intention node from decision process in pogamut end of the project. It is part of decision tree and represent universal AND node in the decision AND-OR trees. In order to fulfill an intention, any of it's sub-actions can be performed and all intentions (goals) are needed to perform one given super-action. It is extending the Node class, so it is possible to attach specified affordances to the Intention node.

By pointing to the trace of Intentions and Actions it is possible to add new node to the episode tree. It is the only way how to add new information to memory.

AtomicAction nodes can be attached on to Action nodes. They cannot be attached to the Intention nodes.

Author:
Michal Cermak
See Also:
Node, Serialized Form

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.episodic.decisions.Node
parent
 
Constructor Summary
Intention(String name, int attractivity)
          Instantiate the class by providing its name and attractivity.
 
Method Summary
 void addSubNode(Action action)
          Adds a new action subnode that can be performed in order to satisfy the goal representing by the current node.
 Collection<Node> getAllChildrenNodes()
          This method returns all Action node that is direct subnodes of this node.
 int getPossibleSubTrees()
           
 Node getSubNode(String name)
          This method returns one specified Action node that is direct subnode of this node.
 Collection<Action> getSubNodes()
          Basically a getter method for the subNodes variable.
 
Methods inherited from class cz.cuni.amis.pogamut.episodic.decisions.Node
addAffordance, getAffordance, getAffordances, getAssociatedNode, getAttractivity, getId, getName, getType, setAssociatedSchemaNode, setId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Intention

public Intention(String name,
                 int attractivity)
Instantiate the class by providing its name and attractivity.

There can be several nodes with identical name in the decision tree, but no node can have two direct children with the same name.

Parameters:
name - Name of the new node.
_attractivity - Specified in XML file. Helps determine when to forget node.
Method Detail

addSubNode

public void addSubNode(Action action)
Adds a new action subnode that can be performed in order to satisfy the goal representing by the current node. Each Intention node can have unlimited number of Action subnodes. The only restriction is that no two direct subnodes can have identical name. These subnodes are actions that can be performed in order to satisfy this intention - they are OR nodes.

This method is used to create the decision tree structure during memory initialization.

No direct goal subnode can share identical name with attached atomic action node.

Parameters:
action - Reference to an already instanciated Action class that should be added attached to this Intention node.

getSubNodes

public Collection<Action> getSubNodes()
Basically a getter method for the subNodes variable. These subnodes are actions, any of which can be performed in order to satisfy this intention(goal) - they are OR nodes. Together with attached affordances they are direct children of this node in the decision tree.

Returns:
Returns a collection of a all Action subnodes of this Intention node.

getSubNode

public Node getSubNode(String name)
This method returns one specified Action node that is direct subnode of this node.

Specified by:
getSubNode in interface INode
Parameters:
name - Name of the node that is to be returned.
Returns:
Returns an Action node with specified name that is direct subnode of this Intention node. If no such action exists returns null.

getAllChildrenNodes

public Collection<Node> getAllChildrenNodes()
This method returns all Action node that is direct subnodes of this node.

Specified by:
getAllChildrenNodes in interface INode
Returns:
Returns all Action nodes that are direct subnodes of this Intention node. If no such action exists returns empty collection.

getPossibleSubTrees

public int getPossibleSubTrees()


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.