Skip to content
Richard Preen edited this page Nov 12, 2021 · 20 revisions

Directory Structure

  • build empty folder to be used for building executables
  • cfg contains configuration files for initialising parameters
  • doc contains files for generating Doxygen documentation
  • env contains data files for problem environments
  • lib contains third-party libraries for random number generation, unit testing, pybind, etc.
  • python contains example Python scripts
  • test contains unit tests
  • xcsf contains XCSF source code

Doxygen + graphviz

To build locally see Compiling and Running.

The github-pages contains prebuilt documentation, including:

Parameters

The main data structure XCSF located within xcsf.h is passed to almost all functions, enabling access to parameters. This structure directly contains general parameters, e.g., double BETA; which can be accessed with xcsf->BETA. It also contains sub-structures containing groups of parameters, e.g., for the EA with struct ArgsEA *ea;

The sub-structures containing groups of parameters are:

  • Condition parameters defined within struct ArgsCond located within condition.h.
  • Action parameters defined within struct ArgsAct located within action.h.
  • Prediction parameters defined within struct ArgsPred located within prediction.h.
  • EA parameters defined within struct ArgsEA located within ea.h.

Every parameter needs its own functions for each of the following tasks:

  1. setting the parameter value - this provides a single point at which the values change and minimums and maximums can be defined to help users and avoid undefined behaviour;
  2. setting the default parameter value;
  3. printing the parameter value;
  4. saving the parameter value to persistent storage;
  5. loading the parameter value from persistent storage;

These functions for general parameters are defined within param.c. For the above-mentioned sub-structures, the functions are located within the respective *.c files. These can then be accessed through the XCSF structure, e.g., xcsf->cond->bits.

To enable the values to be read from the ini configuration file they must also be added to config.c.

Finally, to enable the parameters to be set by Python, they need to be added to pybind_wrapper.cpp.

Clone this wiki locally