📄 xcsmacros.h
字号:
/*
/ (XCS)
/ ------------------------------------
/ Learning Classifier System based on accuracy
/
/ by Martin Butz
/ University of Wuerzburg / University of Illinois at Urbana/Champaign
/ butz@illigal.ge.uiuc.edu
/ Last modified: 10-17-99
/
/ The main header with all the Constants and possible selection of different procedures */
#define TABOUTFILE "XCStest.txt" /* the output file for the results */
#define NR_EXPS 10 /* the number of experiments to take */
#define MAX_NR_STEPS 15000 /* the number of problems to solve in one experiment */
#define MAX_POP_SIZE 800 /* the maximum size of the population */
#define BETA 0.2 /* Learning Rate parameter */
#define GAMMA 0.71 /* Discounting factor that discounts the maximum of the prediction array */
#define MEAN_LAST_GATIME 25 /* do a GA if the average of when a GA was done last time, is at least 25 steps ago */
#define MINIMUM_ERROR 0.010 /* =epsilon 0 in STEWARTS "CLASSIFIER FITNESS BASED ON ACCURACY" */
#define FALL_OFF_RATE 0.1 /* =ALPHA IN STEWARTS "CLASSIFIER FITNESS BASED ON ACCURACY" */
#define CROSSPX 0.8 /* the probability to do crossover */
#define MUTPMUE 0.04 /* probability of mutating one bit */
#define DELTA 0.1 /* used to enforce the deletion of low fitness classifiers (= second deletion method) once they reached DELETION_EXPERIENCE */
#define DELETION_EXPERIENCE 20 /*The experience required to use second deletion method */
#define PREDICTION_THRESHOLD 0.5 /* =O| prediction for a loop in the match set ->covering occurs */
#define DONTCARE_PROBABILITY 0.33 /* probability of choosing DONT_CARE in a newly generated classifier */
#define PRE_INI 10.0 /* prediction initialization in new classifiers */
#define PREER_INI 0.0 /* prediction error initialization in new classifiers */
#define FIT_INI 10. /* fitness initialization in new classifiers */
#define PRE_ERROR_REDUCTION_IN_NEW_CLASSIFIERS 0.25 /* prediction error reduction in with the discovery component generated classifiers */
#define FITNESS_REDUCTION_IN_NEW_CLASSIFIERS 0.1 /* fitness reduction in with the discovery component generated classifiers */
#define KAPPA_MULTIPLIER 0.1 /* decreases the accuracy value if classifier's prediction error is higher than MINIMUM_ERROR*PAYMENT_RANGE */
#define REDUCTION_THRESHOLD 0 /* experience threshold to reduce the used fitness of a classifier in the prediction array */
#define FITNESS_REDUCTION 0.0625 /* amount of reducing the fitness of a classifier in the prediction array */
#define SUBSUME_EXPERIENCE 20 /* the experience required before can be subsumed */
#define INITIALIZE_POP 0 /* Boolean to check if population should be initialized */
#define DECREASE_FITNESS_IN_M_NOT_A 0 /* Boolean to decrease the fitness of classifiers that are not in the match set */
#define FITNESS_REDUCTION_IN_M_NOT_A 0.2 /* reduction of the fitness if not in the action set but in the matchset */
#define DECREASE_FITNESS_IF_MUTATED 0 /* Boolean to decrease the fitness if being mutated by FITNESS_REDUCTION_IN_NEW_CLASSIFIERS */
#define TELETRANSPORTATION 100000 /* possible teletransportation in multi step environments (trial ends if counter exeeds this number) */
#define frand() ((double) rand() / (RAND_MAX+1.0)) /* random for values between 0 and 1 */
#define DONT_CARE '#' /* the don't care sign */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -