A fuzzy logic C++ library
Slifis library documentation

General information

Author and licence : LGPL, version 3

The code is copyrighted 2009-2013 Sebastien Kramm, and is released under the terms of the Library General Public Licence (LGPL), version 3. See included gpl.txt file and lgpl.txt file, or http://www.gnu.org/licenses/lgpl.html

For author contact, use firstname DOT lastname AT univ-rouen DOT fr. Feel free to write.


This library is aimed at C++ developpers who need to add fuzzy logic to their app. Additionaly, it also provides simple applications to learn rules from data, and to process data. These are very basic and should be considered more as sample applications that can be build with the library. (see src/app folder).


Slifis stands for Simple LInear Fuzzy Inference System. It is a C++ library designed for using fuzzy logic inside an application. It can compute a crisp output value from a set of input values and a set of rules. Inference system can be of type 'Mamdani' or 'Takagi-Sugeno'. It can handle the learning situation, where you have data, and you want to build the rules from data. It can also give some information about how well does his training data fit the defined sets of membership functions, through producing of histogram files (see Density information). Persistence is provided through I/O functions, and a graphical application enables interactive evaluating of a FIS. A side library also provides plotting capabilities and an API for showing these plots on screen (relies on external code).

You can also check some Screenshots to see fuzzy logic in action.

See References for more about fuzzy logic and fuzzy inference systems.

The library is organised into two parts (see "Directories" page) :

The core library can itself be viewed as two separate parts:

The src/demo folder contains several small demo applications. In order to be more visual, some of these make use of the gapi interface, so they will build only if gapi is compiled and back-end graphical library is installed on your system.

The src/app folder provides some data related applications. Input format is CSV or ARFF (Weka) files, see Dataset handling.


There are several alternatives:

If you have downloaded only the sources, then see page Building the software.


Misc information

Size of package

See auto-generated stats here. (Generated using http://cloc.sourceforge.net/)


Documentation is self extracted by Doxygen, and released in two forms:

Documentation has two parts, a reference manual, directly extracted from source code, and a Users guide. The latter is written separatly, so it might not always be up to date. To build the doc, use 'make doc', or run Doxygen on one of the three provided doxyfiles (see Building the software).


Yeah, I know, great logo... ;-) It's from http://creatr.cc/


If you are interested in this project, you can contribute. Several topics that would need some improvments are listed below, if you feel you can help, please contact author.

Motivations and related projects

This has started in 2007, when I needed a FOSS fuzzy library for a scientific project. After some time searching an open-sourced C++ library, I came across these three:

After spending some time checking these, I realised that for several reasons, none would do the job. I finally gave out, thinking (as usual, NIH syndrome!) that it would be easy and quick for me to rebuild something from scratch that would target my needs, rather than spending weeks tuning and understanding something I didn't write. It was of course longer that what I thought...

In the meanwhile, the following projects have emerged and might also be interesting for you: