-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Please feel free to help improve these pages.
- Quick start: Compiling and Running.
- Note: changes made in each version are recorded in
CHANGELOG.md
. - Not familiar with learning classifier systems? See these introductory videos: [1], [2].
XCSF is rule-based and maintains a population of classifiers where each classifier
- a condition component
$cl.C$ that determines whether the rule matches input$\vec{x}$ - an action component
$cl.A$ that selects an action$a$ to be performed for a given$\vec{x}$ - a prediction component
$cl.P$ that computes the expected payoff for performing$a$ upon receipt of$\vec{x}$
XCSF thus generates rules of the general form:
IF matches
For each step within a learning trial, XCSF constructs a match set
For each possible action
A system action is then randomly or probabilistically selected during exploration, and the highest payoff action
Upon reaching a terminal state within the environment (as is always the case in single-step problems), each classifier
- Error:
$\epsilon_j \leftarrow \epsilon_j + \beta (|r - p_j| - \epsilon_j)$ - Accuracy:
$\kappa_j =$ - 1 if
$\epsilon_j < \epsilon_0$ -
$\alpha (\epsilon_j / \epsilon_0)^{-\nu}$ otherwise.
With target error threshold$\epsilon_0$ and accuracy offset$\alpha \in$ [0,1], and slope$\nu$ .
- 1 if
- Relative accuracy:
$\kappa_j' = (\kappa_j \cdot num_j) / \sum_j \kappa_j \cdot num_j$
Where classifiers are initialised with numerosity$num = 1$ . - Fitness:
$F_j \leftarrow F_j + \beta(\kappa_j' - F_j)$ - Set size estimate:
$as_j \leftarrow as_j + \beta(|[A]| - as_j)$
Thereafter,
The evolutionary algorithm (EA) is applied to classifiers within
Offspring parameters are initialised by setting the error and fitness to the parental average, and discounted by reduction parameters for error
The resulting offspring are added to
The deletion vote is set proportionally to the set size estimate
In multi-step problems, the previous action set
A schematic illustration of XCSF is shown above. For supervised learning, a single (dummy) action can be used such that
A number of interacting pressures have been identified. A set pressure provides more frequent reproduction opportunities for more general rules. In opposition is a fitness pressure which represses the reproduction of inaccurate and over-general rules. Many forms of
Note: since XCSF is a generalisation of XCS, original XCS behaviour can be specified by using Ternary conditions, Integer actions, and Constant predictions. It is a common misconception that "XCSF is for function approximation and XCS is for RL": XCS can perform regression with piecewise constant predictions (see Wilson, 2001) and XCSF can be used for RL where the payoff is computed.
Related Literature:
- S. W. Wilson (1995) Classifier fitness based on accuracy
- S. W. Wilson (2001) Function approximation with a classifier system
- S. W. Wilson (2002) Classifiers that approximate functions
- M. V. Butz (2006) Rule-based evolutionary online learning systems
- R. J. Urbanowicz and J. H. Moore (2009) Learning classifier systems: A complete introduction, review, and roadmap
- L. Bull (2015) A brief history of learning classifier systems: From CS-1 to XCS and its variants
- R. J. Urbanowicz and W. N. Browne (2017) Introduction to learning classifier systems
This project implements both supervised learning via the updating of match set predictions directly and reinforcement learning via the updating of action set predictions with an environment reward. All mutation rates self-adapted.
See example notebooks and Python Library API.
- Always matching dummy conditions
- Hyperrectangles (center-spread and unordered bound)
- Hyperellipsoids (center-spread)
- Neural networks
- GP trees
- Dynamical GP graphs
- Ternary bitstrings (binarises inputs)
- Both conditions and actions in single dynamical GP graphs
- Both conditions and actions in single neural networks
- Integers
- Neural networks
- Piece-wise constant
- Linear least squares
- Quadratic least squares
- Linear recursive least squares
- Quadratic recursive least squares
- Stochastic gradient descent neural networks
This project is released under the terms of the GNU General Public License v3.0 (GPLv3).