168 const bool print_act,
const bool print_pred);
Action interface data structure.
Parameters for initialising and operating actions.
Parameters for initialising and operating conditions.
Parameters for operating the evolutionary algorithm.
Parameters for initialising and operating predictions.
Classifier data structure.
int mtotal
Total number of times actually matched an input.
void * act
Action structure.
struct PredVtbl const * pred_vptr
Functions acting on predictions.
void * pred
Prediction structure.
int time
Time EA last executed in a participating set.
void * cond
Condition structure.
struct ActVtbl const * act_vptr
Functions acting on actions.
int action
Current classifier action.
bool m
Whether the classifier matches current input.
int age
Total number of times match testing been performed.
double size
Average participated set size.
struct CondVtbl const * cond_vptr
Functions acting on conditions.
double * prediction
Current classifier prediction.
struct Clist * next
Pointer to the next list element.
struct Cl * cl
Pointer to classifier data structure.
Condition interface data structure.
Built-in problem environment interface data structure.
Prediction interface data structure.
int size
Number of macro-classifiers.
struct Clist * list
Linked list of classifiers.
int num
The total numerosity of classifiers.
int RANDOM_STATE
Random number seed.
int M_PROBATION
Trials since creation a cl must match at least 1 input.
double HUBER_DELTA
Delta parameter for Huber loss calculation.
double * nr
Prediction array (stores total fitness)
double mset_size
Average match set size.
bool STATEFUL
Whether classifiers should retain state across trials.
double INIT_FITNESS
Initial classifier fitness value.
double INIT_ERROR
Initial classifier error value.
struct Set prev_pset
Previously stored population set.
double P_EXPLORE
Probability of exploring vs. exploiting.
int x_dim
Number of problem input variables.
double GAMMA
Discount factor for multi-step reward.
int PERF_TRIALS
Number of problem instances to avg performance output.
double * pa
Prediction array (stores fitness weighted predictions)
bool explore
Whether the system is currently exploring or exploiting.
struct ArgsAct * act
Action parameters.
int TELETRANSPORTATION
Maximum steps for a multi-step problem.
struct ArgsCond * cond
Condition parameters.
double prev_reward
Reward from previous step in a multi-step trial.
double aset_size
Average action set size.
bool POP_INIT
Pop initially empty or filled with random conditions.
int THETA_DEL
Min experience before fitness used during deletion.
double NU
Exponent used in calculating classifier accuracy.
int pa_size
Prediction array size.
bool COMPACTION
if sys err < E0: largest of 2 roulette spins deleted
int n_actions
Number of class labels / actions.
char * population_file
Name of a JSON file containing an initial pop.
double prev_pred
Payoff prediction made on the previous step.
int POP_SIZE
Maximum number of micro-classifiers in the population.
bool SET_SUBSUMPTION
Whether to perform match set subsumption.
double DELTA
Fraction of population to increase deletion vote.
struct Set pset
Population set.
double * prev_state
Environment state on the previous step.
double BETA
Learning rate for updating error, fitness, and set size.
struct Set mset
Match set.
int MAX_TRIALS
Number of problem instances to run in one experiment.
struct ArgsPred * pred
Prediction parameters.
double * cover
Values to return for a prediction instead of covering.
double ALPHA
Linear coefficient used to calculate classifier accuracy.
double error
Average system error.
int OMP_NUM_THREADS
Number of threads for parallel processing.
struct Set aset
Action set.
struct Set prev_aset
Previous action set.
int time
Current number of EA executions.
double(* loss_ptr)(const struct XCSF *, const double *, const double *)
Error function.
double mfrac
Generalisation measure.
int LOSS_FUNC
Which loss/error function to apply.
struct ArgsEA * ea
EA parameters.
struct EnvVtbl const * env_vptr
Functions acting on environments.
double E0
Target error under which classifier accuracy is set to 1.
int THETA_SUB
Minimum experience of a classifier to become a subsumer.
void * env
Environment structure (for built-in problems)
int y_dim
Number of problem output variables.
Utility functions for random number handling, etc.
static const int VERSION_MINOR
XCSF minor version number.
void xcsf_store_pset(struct XCSF *xcsf)
Stores the current population.
size_t xcsf_save(const struct XCSF *xcsf, const char *filename)
Writes the current state of XCSF to a file.
static const int VERSION_MAJOR
XCSF major version number.
void xcsf_retrieve_pset(struct XCSF *xcsf)
Retrieves the previously stored population.
void xcsf_pred_expand(const struct XCSF *xcsf)
Inserts a new hidden layer before the output layer within all prediction neural networks in the popul...
static const int VERSION_BUILD
XCSF build version number.
void xcsf_ae_to_classifier(struct XCSF *xcsf, const int y_dim, const int n_del)
Switches from autoencoding to classification.
size_t xcsf_load(struct XCSF *xcsf, const char *filename)
Reads the state of XCSF from a file.
void xcsf_print_pset(const struct XCSF *xcsf, const bool print_cond, const bool print_act, const bool print_pred)
Prints the current XCSF population.
void xcsf_init(struct XCSF *xcsf)
Initialises XCSF with an empty population.
void xcsf_free(struct XCSF *xcsf)
Frees XCSF population sets.