XCSF  1.4.7
XCSF learning classifier system
rule_neural.c File Reference

Neural network rule (condition + action) functions. More...

Include dependency graph for rule_neural.c:

Go to the source code of this file.

Functions

void rule_neural_cond_init (const struct XCSF *xcsf, struct Cl *c)
 
void rule_neural_cond_free (const struct XCSF *xcsf, const struct Cl *c)
 
void rule_neural_cond_copy (const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
 
void rule_neural_cond_cover (const struct XCSF *xcsf, const struct Cl *c, const double *x)
 
void rule_neural_cond_update (const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
 
bool rule_neural_cond_match (const struct XCSF *xcsf, const struct Cl *c, const double *x)
 
bool rule_neural_cond_mutate (const struct XCSF *xcsf, const struct Cl *c)
 
bool rule_neural_cond_crossover (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 
bool rule_neural_cond_general (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 
void rule_neural_cond_print (const struct XCSF *xcsf, const struct Cl *c)
 
double rule_neural_cond_size (const struct XCSF *xcsf, const struct Cl *c)
 
size_t rule_neural_cond_save (const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
 
size_t rule_neural_cond_load (const struct XCSF *xcsf, struct Cl *c, FILE *fp)
 
char * rule_neural_cond_json_export (const struct XCSF *xcsf, const struct Cl *c)
 
void rule_neural_cond_json_import (const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
 
void rule_neural_act_init (const struct XCSF *xcsf, struct Cl *c)
 
void rule_neural_act_free (const struct XCSF *xcsf, const struct Cl *c)
 
void rule_neural_act_copy (const struct XCSF *xcsf, struct Cl *dest, const struct Cl *src)
 
void rule_neural_act_print (const struct XCSF *xcsf, const struct Cl *c)
 
void rule_neural_act_cover (const struct XCSF *xcsf, const struct Cl *c, const double *x, const int action)
 
int rule_neural_act_compute (const struct XCSF *xcsf, const struct Cl *c, const double *x)
 
void rule_neural_act_update (const struct XCSF *xcsf, const struct Cl *c, const double *x, const double *y)
 
bool rule_neural_act_crossover (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 
bool rule_neural_act_general (const struct XCSF *xcsf, const struct Cl *c1, const struct Cl *c2)
 
bool rule_neural_act_mutate (const struct XCSF *xcsf, const struct Cl *c)
 
size_t rule_neural_act_save (const struct XCSF *xcsf, const struct Cl *c, FILE *fp)
 
size_t rule_neural_act_load (const struct XCSF *xcsf, struct Cl *c, FILE *fp)
 
char * rule_neural_act_json_export (const struct XCSF *xcsf, const struct Cl *c)
 
void rule_neural_act_json_import (const struct XCSF *xcsf, struct Cl *c, const cJSON *json)
 

Detailed Description

Neural network rule (condition + action) functions.

Author
Richard Preen rpree.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om
Date
2019–2022.

Definition in file rule_neural.c.

Function Documentation

◆ rule_neural_act_compute()

int rule_neural_act_compute ( const struct XCSF xcsf,
const struct Cl c,
const double *  x 
)

Definition at line 238 of file rule_neural.c.

References clamp_int(), Cl::cond, Net::n_outputs, RuleNeural::net, and neural_output().

Referenced by rule_neural_act_cover().

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

◆ rule_neural_act_copy()

void rule_neural_act_copy ( const struct XCSF xcsf,
struct Cl dest,
const struct Cl src 
)

Definition at line 210 of file rule_neural.c.

◆ rule_neural_act_cover()

void rule_neural_act_cover ( const struct XCSF xcsf,
const struct Cl c,
const double *  x,
const int  action 
)

Definition at line 227 of file rule_neural.c.

References Cl::cond, RuleNeural::net, neural_rand(), rule_neural_act_compute(), and rule_neural_cond_match().

Here is the call graph for this function:

◆ rule_neural_act_crossover()

bool rule_neural_act_crossover ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)

Definition at line 265 of file rule_neural.c.

◆ rule_neural_act_free()

void rule_neural_act_free ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 203 of file rule_neural.c.

◆ rule_neural_act_general()

bool rule_neural_act_general ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)

Definition at line 275 of file rule_neural.c.

◆ rule_neural_act_init()

void rule_neural_act_init ( const struct XCSF xcsf,
struct Cl c 
)

Definition at line 196 of file rule_neural.c.

◆ rule_neural_act_json_export()

char* rule_neural_act_json_export ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 311 of file rule_neural.c.

Referenced by rule_neural_act_print().

Here is the caller graph for this function:

◆ rule_neural_act_json_import()

void rule_neural_act_json_import ( const struct XCSF xcsf,
struct Cl c,
const cJSON *  json 
)

Definition at line 323 of file rule_neural.c.

◆ rule_neural_act_load()

size_t rule_neural_act_load ( const struct XCSF xcsf,
struct Cl c,
FILE *  fp 
)

Definition at line 302 of file rule_neural.c.

◆ rule_neural_act_mutate()

bool rule_neural_act_mutate ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 285 of file rule_neural.c.

◆ rule_neural_act_print()

void rule_neural_act_print ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 219 of file rule_neural.c.

References rule_neural_act_json_export().

Here is the call graph for this function:

◆ rule_neural_act_save()

size_t rule_neural_act_save ( const struct XCSF xcsf,
const struct Cl c,
FILE *  fp 
)

Definition at line 293 of file rule_neural.c.

◆ rule_neural_act_update()

void rule_neural_act_update ( const struct XCSF xcsf,
const struct Cl c,
const double *  x,
const double *  y 
)

Definition at line 255 of file rule_neural.c.

◆ rule_neural_cond_copy()

void rule_neural_cond_copy ( const struct XCSF xcsf,
struct Cl dest,
const struct Cl src 
)

Definition at line 59 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_copy().

Here is the call graph for this function:

◆ rule_neural_cond_cover()

void rule_neural_cond_cover ( const struct XCSF xcsf,
const struct Cl c,
const double *  x 
)

Definition at line 70 of file rule_neural.c.

◆ rule_neural_cond_crossover()

bool rule_neural_cond_crossover ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)

Definition at line 109 of file rule_neural.c.

◆ rule_neural_cond_free()

void rule_neural_cond_free ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 50 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_free().

Here is the call graph for this function:

◆ rule_neural_cond_general()

bool rule_neural_cond_general ( const struct XCSF xcsf,
const struct Cl c1,
const struct Cl c2 
)

Definition at line 119 of file rule_neural.c.

◆ rule_neural_cond_init()

void rule_neural_cond_init ( const struct XCSF xcsf,
struct Cl c 
)

Definition at line 35 of file rule_neural.c.

References Cl::cond, and neural_create().

Here is the call graph for this function:

◆ rule_neural_cond_json_export()

char* rule_neural_cond_json_export ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 164 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_json_export().

Referenced by rule_neural_cond_print().

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

◆ rule_neural_cond_json_import()

void rule_neural_cond_json_import ( const struct XCSF xcsf,
struct Cl c,
const cJSON *  json 
)

Definition at line 181 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_json_import().

Here is the call graph for this function:

◆ rule_neural_cond_load()

size_t rule_neural_cond_load ( const struct XCSF xcsf,
struct Cl c,
FILE *  fp 
)

Definition at line 154 of file rule_neural.c.

References Cl::cond, and neural_load().

Here is the call graph for this function:

◆ rule_neural_cond_match()

bool rule_neural_cond_match ( const struct XCSF xcsf,
const struct Cl c,
const double *  x 
)

Definition at line 89 of file rule_neural.c.

References Cl::cond, RuleNeural::net, neural_output(), and neural_propagate().

Referenced by rule_neural_act_cover().

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

◆ rule_neural_cond_mutate()

bool rule_neural_cond_mutate ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 101 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_mutate().

Here is the call graph for this function:

◆ rule_neural_cond_print()

void rule_neural_cond_print ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 129 of file rule_neural.c.

References rule_neural_cond_json_export().

Here is the call graph for this function:

◆ rule_neural_cond_save()

size_t rule_neural_cond_save ( const struct XCSF xcsf,
const struct Cl c,
FILE *  fp 
)

Definition at line 145 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_save().

Here is the call graph for this function:

◆ rule_neural_cond_size()

double rule_neural_cond_size ( const struct XCSF xcsf,
const struct Cl c 
)

Definition at line 137 of file rule_neural.c.

References Cl::cond, RuleNeural::net, and neural_size().

Here is the call graph for this function:

◆ rule_neural_cond_update()

void rule_neural_cond_update ( const struct XCSF xcsf,
const struct Cl c,
const double *  x,
const double *  y 
)

Definition at line 79 of file rule_neural.c.