Skip to content

EALib: An Evolutionary Algorithms Library

Dave Knoester edited this page Jul 22, 2014 · 8 revisions

EALib is a series of C++ libraries containing a variety of generic components that are useful for building evolutionary algorithms. It is perhaps better to think of EALib as a toolkit, rather than a turn-key solution. The focus of EALib is on compile-time flexibility, as opposed to run-time flexibility. EALib is thus ideally suited for high-performance and/or large-scale evolutionary algorithms. Moreover, many of the components in EALib (e.g., selection strategies) are generic, and can be easily reused as building blocks for more elaborate evolutionary algorithms.

The following libraries are the main parts of EALib:

  • libea: Evolutionary algorithm library. Contains components related to various kinds of evolutionary algorithms, as well as more support-related functionality such as checkpointing, parameters, command-line interfaces, and the like.

  • libmkv: Markov network library. Contains a reference implementation of Markov networks.

  • libann: Artificial neural network library. Contains various kinds of artificial neural network models.

Why use EALib?

The design of EALib is based on research experience with other EA libraries. It specifically addresses three common problems that other libraries tend to neglect, but that are critical for rapid research: Checkpointing, code reuse, and analysis of results.

Checkpointing: This refers to the ability to stop an EA at any point, save the entire state to a file, and then restart it from that saved state as if it had never stopped. This means that the entire population state, random number generator, fitness function, etc., must all be serialized. While this isn't a technically hard task, it can be tedious and very difficult to bolt-on to existing libraries.

Code reuse: It's frequently the case that one will build an algorithm to be used as part of an EA (e.g., tournament selection), that then has to be reused elsewhere -- Either in a different EA or as a component of another algorithm (e.g., a steady-state generational model). By making heavy use of templating, EALib tries to ensure that its components are as reusable as possible.

Analysis: While evolving something interesting is a challenge in and of itself, understanding what evolved is typically even harder. EALib tries to make this process as painless as possible by integrating analysis with the aforementioned ability to load checkpoints. Specifically, analysis tools in EALib always operate on checkpoints. As a result, the complete state of an EA is available to all analysis tools, and there's no distinction between a "runnable" EA and one that is "analyzable."