Skip to content

cbtang01/SOC

Repository files navigation

XCS with SOC (self-organized criticality)

For now, this is a complete replication from https://github.com/hosford42/xcs Accuracy-based Learning Classifier Systems for Python 3, but with some modification to the mutation algorithm

Links

The package is available for download under the permissive Revised BSD License.

Description

XCS is a Python 3 implementation of the XCS algorithm as described in the 2001 paper, An Algorithmic Description of XCS, by Martin Butz and Stewart Wilson. XCS is a type of Learning Classifier System (LCS), a machine learning algorithm that utilizes a genetic algorithm acting on a rule-based system, to solve a reinforcement learning problem.

In its canonical form, XCS accepts a fixed-width string of bits as its input, and attempts to select the best action from a predetermined list of choices using an evolving set of rules that match inputs and offer appropriate suggestions. It then receives a reward signal indicating the quality of its decision, which it uses to adjust the rule set that was used to make the decision. This process is subsequently repeated, allowing the algorithm to evaluate the changes it has already made and further refine the rule set.

A key feature of XCS is that, unlike many other machine learning algorithms, it not only learns the optimal input/output mapping, but also produces a minimal set of rules for describing that mapping. This is a big advantage over other learning algorithms such as neural networks whose models are largely opaque to human analysis, making XCS an important tool in any data scientist's tool belt.

The XCS library provides not only an implementation of the standard XCS algorithm, but a set of interfaces which together constitute a framework for implementing and experimenting with other LCS variants. Future plans for the XCS library include continued expansion of the tool set with additional algorithms, and refinement of the interface to support reinforcement learning algorithms in general.

Modified files from Mr. Hosford's original code

Modified files are: xcs.py under directory xcs\algorithm; and scenarios.py, DARtest.py under directory xcs.

In xcs.py a new function _mutate_action() is added. DARtest.py is our testing program where a selection from a GUI pulldown menu indicates a binary 1, 0 otherwise, or # if unknown (This is compatible with John H. Holland's convention of complex adaptive system. For details see his 2012 book "Signals and Boundaries"). The complicated GUI code is not yet presented here.

Related Projects

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages