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

java.lang.Objectcz.cuni.amis.pogamut.episodic.decisions.DecisionTree
public class DecisionTree
Name of this class can be a little misleading because DecisionTree
is actually a forest constiting of several trees. Roots of these trees
are all possible agent's top-level goals. It is a copy of decision plans
from pogamut end part of the project.
These trees have to be constructed before any information can be added to agent's memory structures.
Each action agent performs is representing by equivalent node in decision tree. This node is located through this class by locating the correct top-level goal first and by going through tree structure until the specified node is located. Each time agent performs an action it is added to memory by providing trace of such nodes that lead to a node representing atomic action that was just executed.
Node,
Serialized Form| Field Summary | |
|---|---|
ArrayList<Integer> |
branchFactor
|
int |
numberOfAtomicActions
|
int |
numberOfNodes
This number is without atomic actions. |
HashMap<String,Intention> |
topLevelGoals
Map of all possible top-level goals agent can have. |
| Constructor Summary | |
|---|---|
DecisionTree()
|
|
| Method Summary | |
|---|---|
boolean |
ensureNodes(String atomicAction,
ArrayList<String> trace,
ArrayList<AffordanceUsed> affordances,
IdGenerator gen)
In case actions performed were not included in xmls. |
ArrayList<Integer> |
getBranchFactor()
|
ArrayList<Node> |
getTrace(ArrayList<String> trace)
This method is used in schemabag when the trace specified by a list of node names is not enough and other information on nodes are needed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public HashMap<String,Intention> topLevelGoals
public int numberOfAtomicActions
public int numberOfNodes
public ArrayList<Integer> branchFactor
| Constructor Detail |
|---|
public DecisionTree()
| Method Detail |
|---|
public ArrayList<Integer> getBranchFactor()
public ArrayList<Node> getTrace(ArrayList<String> trace)
trace - Ordered list of names of nodes beginning with a name
of one top-level goal a next item being always a name of one child node
of previous node.
Node
structures that was specified by the names in parameter.
If there is non-existent node name in the middle of the list, method returns references to the nodes named by previous correct entries only.
public boolean ensureNodes(String atomicAction,
ArrayList<String> trace,
ArrayList<AffordanceUsed> affordances,
IdGenerator gen)
trace - Ordered list of names of nodes beginning with a name
of one top-level goal a next item being always a name of one child node
of previous node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||