|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.irs.jam.IntentionStructure
Represents the agent's intentions
Field Summary | |
protected Goal |
_currentGoal
|
protected Interpreter |
_interpreter
|
protected DList |
_stacks
|
static int |
IS_ABANDONED
|
static int |
IS_ACTIVE
|
static int |
IS_BLOCKED
|
static int |
IS_FAILURE
|
static int |
IS_SUCCESS
|
static int |
IS_UNTRIED
|
Constructor Summary | |
IntentionStructure(Interpreter interpreter)
Default constructor w/ parent interpreter |
Method Summary | |
Goal |
addUnique(GoalAction goalAction,
Relation concludeRel,
Goal prevGoal,
Binding b)
Add the specified goal to the intention structure only if it doesn't already exist. |
boolean |
allGoalsDone()
Old GoalList functionality |
void |
drop(GoalAction goalAction,
Binding b)
Find and remove a goal from the Intention Structure |
int |
executePlan(Plan plan)
Perform an agent's plan |
Goal |
getCurrentGoal()
|
Interpreter |
getInterpreter()
|
DList |
getStacks()
|
DList |
getToplevelGoals()
|
APLElement |
intend(APLElement intention,
boolean force)
Add an intention to the agent's list of intentions |
void |
print(java.io.PrintStream s)
Output information about the Intention Structure in a readable format. |
void |
refreshUtilities()
Go through all of the stacks and recompute their utility values |
void |
removeGoal(Goal goal)
Remove the indicated goal by searching through each intention stack and going through each from top to bottom. |
void |
renewLeafGoals()
Go through all of the stacks and mark all inactive goals as being "new" in order to trigger APL generation. |
void |
sortStacksByUtility()
Arrange the intention stacks according to their evaluated utilities. |
int |
think()
Execute the highest-utility intention |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int IS_UNTRIED
public static final int IS_FAILURE
public static final int IS_SUCCESS
public static final int IS_ACTIVE
public static final int IS_BLOCKED
public static final int IS_ABANDONED
protected DList _stacks
protected Goal _currentGoal
protected Interpreter _interpreter
Constructor Detail |
public IntentionStructure(Interpreter interpreter)
Method Detail |
public DList getStacks()
public DList getToplevelGoals()
public Goal getCurrentGoal()
public Interpreter getInterpreter()
public void sortStacksByUtility()
public APLElement intend(APLElement intention, boolean force)
intention
- The instantiated plan to be intendedforce
- Whether to consider utilities or just put onto intention structurepublic int think()
public int executePlan(Plan plan)
public void refreshUtilities()
public void renewLeafGoals()
public boolean allGoalsDone()
public void drop(GoalAction goalAction, Binding b)
public Goal addUnique(GoalAction goalAction, Relation concludeRel, Goal prevGoal, Binding b)
public void removeGoal(Goal goal)
public void print(java.io.PrintStream s)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |