Opt4J library
Opt4J is a modular framework for meta-heuristic optimization that can be applied to a range of evolutionary algorithms. In the context of this chapter, we are looking at implementing SI algorithms such as ACO and PSO using the library. The libraries that deal with optimization problems have three primary components at abstract level. Creator, decoder, and evaluator. The creator provides random genotypes (please refer to Chapter 8, Genetic Programming, for details on genotype and phenotypes) from the search space. They represent agents in case of SI algorithms. The agents are created by the creator object.
The Opt4J library provides an org.opt4j.optimizers.mopso.Particle
 class that works as a creator. The agents within the swarm are the instances of this class that are actually created by a factory class' org.opt4j.optimizers.mopso.ParticleFactory
. The decoder transforms a genotype to a phenotype. The decoder converts the abstract characteristics into tangible objects and associate...