-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxcsenvironment.hpp
50 lines (40 loc) · 1.6 KB
/
xcsenvironment.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
////////////////////////////////////////////////////////////////
// xcsenvironment.hpp
// environment file for xcs based single step problems
// developed by AB Siddique
// School of Engineering and Computer Science
// Victoria University of Wellington
/////////////////////////////////////////////////////////////////
#ifndef XCSENVIRONMENT_HPP__
#define XCSENVIRONMENT_HPP__
#include "xcsdefs.hpp"
namespace xcs
{
class xcsSys;
class clfrharness;
class env
{
//friend class
friend class xcsSys;
friend class clfrharness;
public:
env();
~env();
bool isDV1Term(int nNum);
void resetState(OPTYPE pOpState[]);
double evlAction(int nAction, int nGenunAct, bool &bReset);
// Executes the action and determines the reward.
double prfmAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmEvnParityAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmCarryAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmMuxAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmHiddenEvenParityAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmHiddenOddParityAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmCountOnesAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmMajorityOnAction(int nAction, OPTYPE pOpState[], bool &bReset);
double prfmDV1Action(int nAction, OPTYPE pOpState[], bool &bReset);
private:
int *m_pnPosRlvntBits; //if it gives an error due to a bug in codeblock, just specify the size
};
} //end namespace xcs
#endif //XCSENVIRONMENT_HPP__