rl_exp.h - Header file with experimental setups for CAR



/* File with experimental setups for reinforcement learning systems. */ #ifndef RL_EXP_H #define RL_EXP_H #include #include #include #include #include // input & output streams #include // i-o parametrized manipulators #include // in-memory string manipulations for i/o, new standard #include #include #include using namespace std; #include "maths.h" #include "nr_ut.h" #include "conx2.h" //full connections class #include "in_out.h" #include "rl.h" /* A.a. Exp_CAR_I B Summary data from Beads and related experiments : a. */ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ /* A.a. Exp_CAR_I will serve to help explore some param. ranges of model and to evaluate / organise / store the results. */ class Exp_CAR_I : public CAR3 { protected: static const char *const ERROR; // char *auxStr; /* Used for various i-o stuff */ /* The following are used by RefreshIter: */ // float **iterParPtr, **iterIterNo, **iterEndPtr ; // Iter iter ; int runTrialN ; // total n of trials per run FOR INTERNAL USE ! int protN ; // No. of different protocols per experiment. Usu. 3 int tRunN ; // total run number per expt. = protN * runN int resPSt; // Start and end of response prevention trials int resPEn; int curTrN ; // Current Trial number int extBlTrN ; // No. of trial in each pure-extinction (no resp prev) block public: Exp_CAR_I() ; // ~Exp_CAR_I() ; /* Parametres concerning number of integrations of various types done : */ // The following in float for convenient menu-ing : float prelimTrN ; // no US or modulation run-in before extp. trials. Usu. 50 float lrnTrN ; // US (and CSs) for this many. Usu. 20 float extnBlockTrN ; // No. of extinction trials per block float resPrevSt; // Response prevention trials start float resPrevNo; // No. of " " " float runN; // number of runs per protocol int LrnTrN(){ return roundfl(lrnTrN); } ; // for when needed in integer format. int PrelimTrN(){ return roundfl(prelimTrN) ; } ; int RunTrialN(){ return runTrialN; } ; int ResPrevSt(){ return resPSt ; } ; int ResPrevEn(){ return resPEn ; } ; int ResPrevTrN(){ return resPEn-resPSt+1 ; } ; int ExtBlockTrN(){ return extBlTrN ; } ; int ProtN(){ return protN ; } ; int RunN(){return roundfl(runN) ; } ; int CurTrN(){ return curTrN ; } ; unsigned int TRunN(){ return tRunN ; } ; void RefreshParams(); // use public params to update non-public ones etc. void SetCurTrN(int currentTrial ){ curTrN =currentTrial ; } ; // return an action, randomly chosen acc. to params. of actions in // selGActNoRetDegResPrev doesn't allow shuttling back & implements // response prevention : int selGActNoRetDgnResPrev(int state); // output files with parameter values, explanations etc.: void AuxOutput(float exp_apMod, float exp_AvAt, float exp_ShAmp); } ; #endif // RL_EXP_H // -------------------- eof ---------------------------------