|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.episodic.decisions.Node
cz.cuni.amis.pogamut.episodic.decisions.Action
public class Action
Class Action represents an action node from decision process
in pogamut end of the project. It is part of decision tree and represent
universal OR node in the decision AND-OR trees. In order to perform
an action, all its sub-goals must be fullfilled and an action can fulfill
one given super-goal. It is extending the Node class, so it is
possible to attach specified affordances to the Action 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.
Node,
Serialized Form| Field Summary |
|---|
| Fields inherited from class cz.cuni.amis.pogamut.episodic.decisions.Node |
|---|
parent |
| Constructor Summary | |
|---|---|
Action(String name,
int attractivity)
Instantiate the class by providing its name and attractivity. |
|
| Method Summary | |
|---|---|
void |
addAtomicAction(AtomicAction aa)
Attach new atomic action that will be executed when performing this action node. |
void |
addSubNode(Intention intention)
Adds a new goal subnode that has to be satisfied first in order to perform the action representing by the current node. |
Collection<Node> |
getAllChildrenNodes()
This method returns Intention nodes that
are direct subnodes of this node and atomic action nodes. |
AtomicAction |
getAtomicAction(String s)
This method returns one specified AtomicAction node that
is attached to this node. |
Collection<AtomicAction> |
getAtomicActions()
Basically a getter method for the atomicActions variable. |
int |
getPossibleSubTrees()
|
Intention |
getSubIntention(String name)
This method returns one specified Intention node that
is direct subnode of this node. |
Node |
getSubNode(String name)
This method returns one specified Intention node that
is direct subnode of this node. |
Collection<Intention> |
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 |
|---|
public Action(String name,
int 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.
name - Name of the new node._attractivity - Specified in XML file. Helps determine when to forget node.| Method Detail |
|---|
public void addAtomicAction(AtomicAction aa)
Action node can have unlimited number of
AtomicAction subnodes. The only restriction is that no two
subnodes can have identical name. These subnodes are atomic actions
that will be executed once all goals are satisfied and agent is performing
this action. It is reasonable that action nodes without any subgoals
will have at least one atomic action attached to it.
No attached atomic action node can share identical name with any direct goal subnode.
aa - Reference to an already instanciated AtomicAction
class that should be added attached to this action node.public Collection<AtomicAction> getAtomicActions()
atomicActions variable.
AtomicActions
attached to this Action node. These are atomic actions
that will be executed once all goals are satisfied and agent is performing
this action.public AtomicAction getAtomicAction(String s)
AtomicAction node that
is attached to this node.
s - Name of the atomic action that is to be returned.
AtomicAction node with specified
name attached to this Action node. Returns null
if there is no such AtomicAction attached to it.public void addSubNode(Intention intention)
Action
node can have unlimited number of Intention subnodes.
The only restriction is that no two direct subnodes can have identical
name. These subnodes are goals that all need to be completed in order
to perform this action - they are AND 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.
intention - Reference to an already instanciated Intention
class that should be added attached to this Action node.public Collection<Intention> getSubNodes()
subNodes variable.
These subnodes are goals that all need to be completed in order
to perform this action - they are AND nodes. Together with attached
atomic actions and affordances they are direct children of this node
in the decision tree.
Intetion (goal)
subnodes of this Action node.public Node getSubNode(String name)
Intention node that
is direct subnode of this node. If no such node exists it tries to
find and atomic action of such name.
getSubNode in interface INodename - Name of the node that is to be returned.
Intention node with specified
name that is direct subnode of this Action node.
If no such goal exists returns AtomicAction node
attached to this node. Returns null if there is
no such AtomicAction attached to it.public Intention getSubIntention(String name)
Intention node that
is direct subnode of this node.
name - Name of the node that is to be returned.
Intention node with specified
name that is direct subnode of this Action node.
Returns null if there is
no such Intention attached to it.public Collection<Node> getAllChildrenNodes()
Intention nodes that
are direct subnodes of this node and atomic action nodes.
getAllChildrenNodes in interface INodeIntention nodes that
are direct subnodes of this Action node and
AtomicAction nodes attached to this node.public int getPossibleSubTrees()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||