📄 boolfktenv.h
字号:
/*/ (XCS-C 1.2)/ ------------------------------------/ Learning Classifier System based on accuracy// by / Martin V. Butz/ Illinois Genetic Algorithms Laboratory (IlliGAL)/ University of Illinois at Urbana/Champaign/ butz@illigal.ge.uiuc.edu// Last modified: 09-30-2003// The Boolean Function environment - header - provides the default parameter settings / as well as the struct which maintains current parameter settings. */struct booleanEnv{ int constantFunction; int randomFunction; int parityFunction; int multiplexerFunction; int concatenatedMultiplexer; int biasedMultiplexer; int countOnesFunction; double samplingBias; double addNoiseToAction; double actionNoiseMu; double actionNoiseSigma; int paymentRange; int conditionLength; int paritySize; int multiplexerBits; int payoffLandscape; int bmpX; int bmpY; int countOnesSize; int countOnesType;};#define CONSTANT_FUNCTION 0#define RANDOM_FUNCTION 0#define PARITY_FUNCTION 0#define MULTIPLEXER_FUNCTION 1#define CONCATENATED_MULTIPLEXER 0#define BIASED_MULTIPLEXER 0#define COUNT_ONES_FUNCTION 0#define SAMPLING_BIAS 0.5 /* 0.5 means: There is no sampling bias! */#define ADD_NOISE_TO_ACTION 0 /* 0=add no noise 1=add noise to both actions 2=add noise to action 0 3=add noise to action 1 4.XX = probability of other outcome (given only PAYMENT_RANGE and 0 as possible outcomes) */#define ACTION_NOISE_MU 0.0 /* the skew if the payoff noise */#define ACTION_NOISE_SIGMA 0.0 /* standard deviation of the normal distributed payoff noise */#define PAYMENT_RANGE 1000. /* always for multiplexer: 1000, 1800, 3400, 6600, 13000 */#define CONDITION_LENGTH 20 /* for MP: 6 11 20 37 70 *//* Parity Function Constants */#define PARITY_SIZE 5/* Multiplexer Function Constants */#define MULTIPLEXER_BITS 4 /* Number of position bits */ #define PAYOFF_LANDSCAPE 0 /* 1=layered reward scheme *//* Biased Multiplexer Function */#define BMP_X 2#define BMP_Y 2/* Count Ones Function */#define COUNT_ONES_SIZE 5#define COUNT_ONES_TYPE 2#include "env.h"/* local functions */double doRandomAction(char *state, int act, int *correct);double doParityAction(char *state, int act, int *correct);double doMPAction(char *state, int act,int *correct);double doConcatenatedMultiplexerAction(char *state, int act, int *correct);double doBiasedMultiplexerAction(char *state, int act, int *correct);double doCountOnesAction(char *state, int act, int *correct);void newFunctionChoice();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -