XCSF  1.4.7
XCSF learning classifier system
env_csv.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 
32 struct EnvCSV {
33  struct Input *train_data;
34  struct Input *test_data;
35 };
36 
37 bool
38 env_csv_is_done(const struct XCSF *xcsf);
39 
40 bool
41 env_csv_multistep(const struct XCSF *xcsf);
42 
43 double
44 env_csv_execute(const struct XCSF *xcsf, const int action);
45 
46 double
47 env_csv_maxpayoff(const struct XCSF *xcsf);
48 
49 const double *
50 env_csv_get_state(const struct XCSF *xcsf);
51 
52 void
53 env_csv_free(const struct XCSF *xcsf);
54 
55 void
56 env_csv_init(struct XCSF *xcsf, const char *filename);
57 
58 void
59 env_csv_reset(const struct XCSF *xcsf);
60 
64 static struct EnvVtbl const env_csv_vtbl = {
68 };
Built-in problem environment interface.
bool env_csv_multistep(const struct XCSF *xcsf)
Returns whether the csv environment is a multistep problem.
Definition: env_csv.c:243
const double * env_csv_get_state(const struct XCSF *xcsf)
Dummy method since no state is returned by the csv environment.
Definition: env_csv.c:217
static struct EnvVtbl const env_csv_vtbl
csv input environment implemented functions.
Definition: env_csv.h:64
double env_csv_execute(const struct XCSF *xcsf, const int action)
Dummy method since no action is executed by the csv environment.
Definition: env_csv.c:230
bool env_csv_is_done(const struct XCSF *xcsf)
Returns whether the csv environment is in a terminal state.
Definition: env_csv.c:205
void env_csv_reset(const struct XCSF *xcsf)
Dummy method since no csv environment reset is necessary.
Definition: env_csv.c:194
void env_csv_init(struct XCSF *xcsf, const char *filename)
Initialises a CSV input environment from a specified filename.
Definition: env_csv.c:160
double env_csv_maxpayoff(const struct XCSF *xcsf)
Returns the maximum payoff value possible in the csv environment.
Definition: env_csv.c:255
void env_csv_free(const struct XCSF *xcsf)
Frees the csv environment.
Definition: env_csv.c:177
Definition: __init__.py:1
CSV environment data structure.
Definition: env_csv.h:32
struct Input * train_data
Definition: env_csv.h:33
struct Input * test_data
Definition: env_csv.h:34
Built-in problem environment interface data structure.
Definition: env.h:35
Input data structure.
Definition: xcsf.h:146
XCSF data structure.
Definition: xcsf.h:85
XCSF data structures.