clarion.acs.gs
Class GoalList

java.lang.Object
  extended byclarion.acs.gs.GoalList
All Implemented Interfaces:
GoalStructure

public class GoalList
extends java.lang.Object
implements GoalStructure


Field Summary
protected  int curActiveGoalIdx
          current active goal index.
protected  long currentTime
          current time for calculating BLA.
protected  StochasticDecider decider
          used for selecting active goal.
protected  Global global
          global settings.
protected  GoalChunk[] goalItems
          recording current existing goals.
protected  short[][] goalReps
          all of the possible goals.
protected  int gsActionMadeMode
          GS action by top level only or by both.
protected  double gsBla
          BLA of GS.
protected  int gsBlaOption
          BLA option: constant or recency-based.
protected  double[] gsBlaParams
          parameters of recency-based BLA.
protected  short[] gsParamDVs
          each parameter dimension of a goal.
protected  int netIdx
          net index.
protected  double P_EXT
          coordination of external vs goal actions.
protected  double P_GS
          coordination of external vs goal actions.
protected  int size_gc
          size of goal chunk.
protected  int size_gs
          size of goal structure.
protected  TaskClarion taskClarion
          task-specific clarion settings.
protected  double threshold_GS
          goal threshold.
 
Constructor Summary
GoalList(Global g)
          constructor.
 
Method Summary
 boolean actionNoGoal()
          routine of no-goal-action.
 boolean actionReset(int idx)
          'reset' action.
 boolean actionSet(int idx)
          'set' action.
 int getActiveGoal()
          Returns the currently active goal in terms of goal index.
 GoalChunk getActiveItem()
          Returns the currently active goal item in terms of a chunk.
 int getSize()
          Returns the number of goals in this goal stack.
 double getThreshlod()
          Returns the goal threshold.
 boolean goalCompete()
          The process of goal competition to be active.
 void goalFinished(boolean popFlag)
          routine when a goal is completed, no automatic goal pop.
 boolean isEmpty()
          Returns if this goal stack is empty or not.
 void setCurrentTime(long time)
          Sets current time.
 void updateState(double[] state)
          Updates current goal state as input to GSNet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected Global global
global settings.


taskClarion

protected TaskClarion taskClarion
task-specific clarion settings.


netIdx

protected int netIdx
net index.


curActiveGoalIdx

protected int curActiveGoalIdx
current active goal index.


goalReps

protected short[][] goalReps
all of the possible goals.


gsParamDVs

protected short[] gsParamDVs
each parameter dimension of a goal.


size_gc

protected int size_gc
size of goal chunk.


size_gs

protected int size_gs
size of goal structure.


gsActionMadeMode

protected int gsActionMadeMode
GS action by top level only or by both.


threshold_GS

protected double threshold_GS
goal threshold.


gsBlaOption

protected int gsBlaOption
BLA option: constant or recency-based.


gsBla

protected double gsBla
BLA of GS.


gsBlaParams

protected double[] gsBlaParams
parameters of recency-based BLA.


currentTime

protected long currentTime
current time for calculating BLA.


P_GS

protected double P_GS
coordination of external vs goal actions.


P_EXT

protected double P_EXT
coordination of external vs goal actions.


goalItems

protected GoalChunk[] goalItems
recording current existing goals.


decider

protected StochasticDecider decider
used for selecting active goal.

Constructor Detail

GoalList

public GoalList(Global g)
constructor.

Parameters:
g - the global settings.
Method Detail

isEmpty

public boolean isEmpty()
Returns if this goal stack is empty or not.

Specified by:
isEmpty in interface GoalStructure

getSize

public int getSize()
Returns the number of goals in this goal stack.

Specified by:
getSize in interface GoalStructure

getActiveGoal

public int getActiveGoal()
Returns the currently active goal in terms of goal index.

Specified by:
getActiveGoal in interface GoalStructure

getActiveItem

public GoalChunk getActiveItem()
Returns the currently active goal item in terms of a chunk.

Specified by:
getActiveItem in interface GoalStructure

getThreshlod

public double getThreshlod()
Returns the goal threshold.

Returns:
the goal threshold.

setCurrentTime

public void setCurrentTime(long time)
Sets current time.

Parameters:
time - the time to set.

actionSet

public boolean actionSet(int idx)
'set' action.

Specified by:
actionSet in interface GoalStructure
Parameters:
idx - goal idx.

actionReset

public boolean actionReset(int idx)
'reset' action.

Specified by:
actionReset in interface GoalStructure
Parameters:
idx - goal idx.

actionNoGoal

public boolean actionNoGoal()
routine of no-goal-action.

Specified by:
actionNoGoal in interface GoalStructure

goalCompete

public boolean goalCompete()
The process of goal competition to be active.


goalFinished

public void goalFinished(boolean popFlag)
routine when a goal is completed, no automatic goal pop.

Specified by:
goalFinished in interface GoalStructure
Parameters:
popFlag - indicate a pop action is done or not.

updateState

public void updateState(double[] state)
Updates current goal state as input to GSNet.

Specified by:
updateState in interface GoalStructure
Parameters:
state - current state to update.