As mentioned earlier, the genetic operators are independent of the problem to be solved. Let's implement all the components of the reproduction cycle. The fitness function and the encoding scheme are highly domain specific.

In accordance with the principles of object-oriented programming, the software architecture defines the genetic operators using a top-down approach: starting with the population, then each chromosome, down to each gene.

Software design

The implementation of the genetic algorithm uses a design that is similar to the template for classifiers (refer to the Design template for classifier section in Appendix A, Basic Concepts).

The key components of the implementation of the genetic algorithm are as follows:

  • The Population ...

Get Scala: Guide for Data Science Professionals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.