XCSF
1.4.7
XCSF learning classifier system
|
The real multiplexer problem environment. More...
Go to the source code of this file.
Macros | |
#define | MAX_PAYOFF (1.) |
Payoff provided for making a correct classification. More... | |
Functions | |
void | env_mux_init (struct XCSF *xcsf, const int bits) |
Initialises a real multiplexer environment of specified length. More... | |
void | env_mux_free (const struct XCSF *xcsf) |
Frees the multiplexer environment. More... | |
const double * | env_mux_get_state (const struct XCSF *xcsf) |
Returns a random multiplexer problem instance. More... | |
double | env_mux_execute (const struct XCSF *xcsf, const int action) |
Returns the reward for executing a multiplexer action. More... | |
void | env_mux_reset (const struct XCSF *xcsf) |
Dummy method since no multiplexer reset is necessary. More... | |
bool | env_mux_is_done (const struct XCSF *xcsf) |
Returns whether the multiplexer is in a terminal state. More... | |
double | env_mux_maxpayoff (const struct XCSF *xcsf) |
Returns the maximum payoff value possible in the multiplexer. More... | |
bool | env_mux_multistep (const struct XCSF *xcsf) |
Returns whether the multiplexer is a multistep problem. More... | |
The real multiplexer problem environment.
Generates random real vectors of length k+pow(2,k) where the first k bits determine the position of the output bit in the last pow(2,k) bits. E.g., for a 3-bit problem, the first rounded bit addresses which of the following 2 bits are the (rounded) output.
Example valid lengths: 3, 6, 11, 20, 37, 70, 135, 264.
Definition in file env_mux.c.
#define MAX_PAYOFF (1.) |
double env_mux_execute | ( | const struct XCSF * | xcsf, |
const int | action | ||
) |
Returns the reward for executing a multiplexer action.
[in] | xcsf | The XCSF data structure. |
[in] | action | The selected action. |
Definition at line 92 of file env_mux.c.
References MAX_PAYOFF, EnvMux::pos_bits, and EnvMux::state.
void env_mux_free | ( | const struct XCSF * | xcsf | ) |
Frees the multiplexer environment.
[in] | xcsf | The XCSF data structure. |
Definition at line 63 of file env_mux.c.
References EnvMux::state.
const double* env_mux_get_state | ( | const struct XCSF * | xcsf | ) |
Returns a random multiplexer problem instance.
[in] | xcsf | The XCSF data structure. |
Definition at line 76 of file env_mux.c.
References rand_uniform(), and EnvMux::state.
void env_mux_init | ( | struct XCSF * | xcsf, |
const int | bits | ||
) |
Initialises a real multiplexer environment of specified length.
The biggest mux problem is chosen that fits the specified length.
[in] | xcsf | The XCSF data structure. |
[in] | bits | The problem length. |
Definition at line 44 of file env_mux.c.
References param_init(), EnvMux::pos_bits, and EnvMux::state.
Referenced by env_init().
bool env_mux_is_done | ( | const struct XCSF * | xcsf | ) |
double env_mux_maxpayoff | ( | const struct XCSF * | xcsf | ) |
Returns the maximum payoff value possible in the multiplexer.
[in] | xcsf | The XCSF data structure. |
Definition at line 133 of file env_mux.c.
References MAX_PAYOFF.
bool env_mux_multistep | ( | const struct XCSF * | xcsf | ) |