#ifndef GLOBAL_H #define GLOBAL_H class Global { public: Global(); // methods void evolve(double td); double decay_dopamin(double level, double td); // return how much the level _would_ have been decayed // variables (and quasi constants) // * neuron related double voltage_tau; // [s] double voltage_base; // [V] rest potential double threshold; // [V] above which a spike is emitted double Wmax, Wmin; // [V] double sumWeight; // [V] double absoluteRefractoryTime; // [V] // * dopamin double dopamin_level; // [?] double dopamin_tau; // [s] // * STDP double stdp_tau_plus; // [s] double stdp_tau_minus; // [s] double stdp_lambda_plus; // [1] double stdp_lambda_minus; // [1] double stdp_et_tau; // [s] eligibility trace tau // * IP double ip_sliding_avg_tau; double ip_lambda_R; double ip_lambda_C; double ip_dst_mom1; double ip_dst_mom2; // * external noise double en_current; // [V] double en_freq; // [Hz/Neuron] // * trainer double trainer_eval_delay; // [s] int trainer_numSymbols; // [1] double trainer_refractoryTime; // [s] double trainer_rewardAmount; // [?] double trainer_rd_c1; // readout delay with double trainer_rd_c2; // delay = c1 + t*c2 + r*c3 + t*r'*c4 double trainer_rd_c3; // where double trainer_rd_c4; // r and r' are two distinct random numbers (equ. dist in [0,1)) // reflection template bool reflect(Action &a); typedef int id_type; static id_type numElements(); static Neuron * singleton(int num); // return neuron # num } global; Global &g = global; #endif // GLOBAL_H