Download CORE Manual
Transcript
CORE MANUAL
//GetNamesOfStateVariables(int i) TO RETREIVE THE NAMES OF STATE VARIABLES IN //THE
POLICY OF INDEX i.
APolicy(0].m_StateVarName;
//GetNbOfSamplesForEachVariable(int i) RETREIVES THE NB OF SAMPLES PER //STATE
VARIABLE IN THE POLICY OF INDEX i.
APolicy(0].m_iSamplePtNb;
//GetInitialValueOfStateVariable(int i) RETREIVES THE INITIAL VALUES THE STATE
VARIABLE IN THE POLICY OF INDEX i.
APolicy(0].m_StateVar;
C.4
Class VARDATA
The class VARDATA stores the sample points used to analyze the behavior of the state variable
(see the section STATE VARIABLES in Script. 4 page 155). The class APOLICY includes an array of
VARDATA objects, one per state variable. VARDATA is declared as follows:
class VARDATA
//////////////////////////////////////////////////////////////////
// CLASS TO STORE THE DATA NECESSARY TO ANALYSE EACH STATE VARIABLE
//////////////////////////////////////////////////////////////////
{
public:
int iDataPtNb;
float* DataPt;
VARDATA();
~VARDATA();
void operator=(const VARDATA &other);
void Build(int XDataPtNb, float* XDataPt);
protected:
void GetInterval(float X);
};
The method VARDATA.Build(…) reads the state variable string and copies the sample points in
the dynamic array DataPt[iDataPtNb].
C.5
C5.1
Class SPOLICY (State policy)
Definition
The class SPOLICY encapsulates the state policy, which stores the set of directives (with their
respective probabilities) that can be executed when the agent has recognized its state. It is explicitly
defined by one line in the section STATE-DIRECTIVE STABLE of the mission script. The class
SPOLICY is declared as follows:
class SPOLICY
//STATE POLICY
/////////////////////////////////////////////////////////////////////////////////////////
// THE CLASS SPOLICY REPRESENTS THE POLICY FOR ONE STATE. THE AGENT
// POLICY IS AN ARRAY OF STATE POLICIES, ONE PER STATE.
/////////////////////////////////////////////////////////////////////////////////////////
{
public:
int m_ActionNb; //NB OF POSSIBLE ACTIONS
int* m_Action; //ACTION ARRAY. FOR INSTANCE m_Action[2]=5 MEANS THAT THE
//THIRD POSSIBLE ACTION WHEN THE ENVIRONMENT IS IN THIS
Revision: 128
IV-158/206
18/12/2013