XCSF 1.4.8
XCSF learning classifier system
Loading...
Searching...
No Matches
env_mux.h
Go to the documentation of this file.
1/*
2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 */
15
24#pragma once
25
26#include "env.h"
27#include "xcsf.h"
28
32struct EnvMux {
33 double *state;
35};
36
37bool
38env_mux_is_done(const struct XCSF *xcsf);
39
40bool
41env_mux_multistep(const struct XCSF *xcsf);
42
43double
44env_mux_execute(const struct XCSF *xcsf, const int action);
45
46double
47env_mux_maxpayoff(const struct XCSF *xcsf);
48
49const double *
50env_mux_get_state(const struct XCSF *xcsf);
51
52void
53env_mux_free(const struct XCSF *xcsf);
54
55void
56env_mux_init(struct XCSF *xcsf, int bits);
57
58void
59env_mux_reset(const struct XCSF *xcsf);
60
Built-in problem environment interface.
void env_mux_free(const struct XCSF *xcsf)
Frees the multiplexer environment.
Definition env_mux.c:63
double env_mux_execute(const struct XCSF *xcsf, const int action)
Returns the reward for executing a multiplexer action.
Definition env_mux.c:92
const double * env_mux_get_state(const struct XCSF *xcsf)
Returns a random multiplexer problem instance.
Definition env_mux.c:76
void env_mux_reset(const struct XCSF *xcsf)
Dummy method since no multiplexer reset is necessary.
Definition env_mux.c:110
bool env_mux_is_done(const struct XCSF *xcsf)
Returns whether the multiplexer is in a terminal state.
Definition env_mux.c:121
void env_mux_init(struct XCSF *xcsf, int bits)
Initialises a real multiplexer environment of specified length.
Definition env_mux.c:44
static struct EnvVtbl const env_mux_vtbl
Real multiplexer environment implemented functions.
Definition env_mux.h:64
bool env_mux_multistep(const struct XCSF *xcsf)
Returns whether the multiplexer is a multistep problem.
Definition env_mux.c:145
double env_mux_maxpayoff(const struct XCSF *xcsf)
Returns the maximum payoff value possible in the multiplexer.
Definition env_mux.c:133
Real multiplexer environment data structure.
Definition env_mux.h:32
int pos_bits
Number of position bits.
Definition env_mux.h:34
double * state
Current state.
Definition env_mux.h:33
Built-in problem environment interface data structure.
Definition env.h:35
XCSF data structure.
Definition xcsf.h:85
XCSF data structures.