XCSF  1.4.7
XCSF learning classifier system
env.h File Reference

Built-in problem environment interface. More...

#include "xcsf.h"
Include dependency graph for env.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EnvVtbl
 Built-in problem environment interface data structure. More...
 

Functions

void env_init (struct XCSF *xcsf, char **argv)
 Initialises a built-in problem environment. More...
 
static bool env_is_done (const struct XCSF *xcsf)
 Returns whether the environment is in a terminal state. More...
 
static bool env_multistep (const struct XCSF *xcsf)
 Returns whether the environment is a multistep problem. More...
 
static double env_execute (const struct XCSF *xcsf, const int action)
 Executes the specified action and returns the payoff. More...
 
static double env_max_payoff (const struct XCSF *xcsf)
 Returns the maximum payoff value possible in the environment. More...
 
static const double * env_get_state (const struct XCSF *xcsf)
 Returns the current environment perceptions. More...
 
static void env_free (const struct XCSF *xcsf)
 Frees the environment. More...
 
static void env_reset (const struct XCSF *xcsf)
 Resets the environment. More...
 

Detailed Description

Built-in problem environment interface.

Author
Richard Preen rpree.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om
Date
2015–2020.

Definition in file env.h.

Function Documentation

◆ env_execute()

static double env_execute ( const struct XCSF xcsf,
const int  action 
)
static

Executes the specified action and returns the payoff.

Parameters
[in]xcsfThe XCSF data structure.
[in]actionThe action to perform.
Returns
The payoff from performing the action.

Definition at line 74 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function:

◆ env_free()

static void env_free ( const struct XCSF xcsf)
static

Frees the environment.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 106 of file env.h.

Referenced by main().

Here is the caller graph for this function:

◆ env_get_state()

static const double* env_get_state ( const struct XCSF xcsf)
static

Returns the current environment perceptions.

Parameters
[in]xcsfThe XCSF data structure.
Returns
The current perceptions.

Definition at line 96 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function:

◆ env_init()

void env_init ( struct XCSF xcsf,
char **  argv 
)

Initialises a built-in problem environment.

Parameters
[in]xcsfThe XCSF data structure.
[in]argvThe command line arguments.

Definition at line 34 of file env.c.

References env_csv_init(), env_csv_vtbl, env_maze_init(), env_maze_vtbl, env_mux_init(), and env_mux_vtbl.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ env_is_done()

static bool env_is_done ( const struct XCSF xcsf)
static

Returns whether the environment is in a terminal state.

Parameters
[in]xcsfThe XCSF data structure.
Returns
Whether the environment is in a terminal state.

Definition at line 51 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function:

◆ env_max_payoff()

static double env_max_payoff ( const struct XCSF xcsf)
static

Returns the maximum payoff value possible in the environment.

Parameters
[in]xcsfThe XCSF data structure.
Returns
The maximum payoff.

Definition at line 85 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function:

◆ env_multistep()

static bool env_multistep ( const struct XCSF xcsf)
static

Returns whether the environment is a multistep problem.

Parameters
[in]xcsfThe XCSF data structure.
Returns
Whether the environment is multistep.

Definition at line 62 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function:

◆ env_reset()

static void env_reset ( const struct XCSF xcsf)
static

Resets the environment.

Parameters
[in]xcsfThe XCSF data structure.

Definition at line 116 of file env.h.

Referenced by xcs_rl_trial().

Here is the caller graph for this function: