Integer encoded problems#

namespace problems

Implementations of some benchmark functions that can be used to test the genetic algorithms. There are some benchmark problems implemented for every encoding type, and the real-encoded problems can also be used for the binary-encoded GAs.

All of the problems are implemented for maximization.

class StringFinder#

#include <problems/integer.hpp>
class StringFinder : public gapp::problems::BenchmarkFunction<IntegerGene>#

Implementation of a simple test problem for the integer-encoded GA. The goal is for the algorithm to match a target string.

The problem is implemented for maximization, and only usable with the single-objective, integer-encoded GA. The number of variables will be equal to the length of the target string set in the constructor.

Public Functions

explicit StringFinder(std::string target)#

Create an instance of the string matching problem.

Parameters:

target – The string to look for.