12.01.2015 Views

Evolutionary Computation : A Unified Approach

Evolutionary Computation : A Unified Approach

Evolutionary Computation : A Unified Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A.1. EC1: A VERY SIMPLE EC SYSTEM 235<br />

The base class for the population maintained by an EA is defined in Population.java.<br />

The base class for individuals contained in a population is defined in Individual.java, and<br />

the base class for an individual’s genome is defined in Genome.java. In EC1 there is only<br />

one type of genome supported, namely a vector of real-valued genes.<br />

The base class for problems is defined in Landscape.java, which is then specialized in<br />

RvpLscape.java to the class RvpLscape (real-valued parameter landscapes), and specialized<br />

again in Parabola.java to parabolic landscapes. The code in Parabola.java can be used as a<br />

template to easily add other more interesting landscapes.<br />

Finally, EC rand.java and Pad.java provide some convenient utility code.<br />

A.1.2<br />

EC1 Parameters<br />

The EC1 configuration file discussed earlier is used to modify the behavior of EC1 from one<br />

run to the next. EC1 uses the Java-provided Properties class to read in the information in<br />

a configuration file. The Properties class provided the ability to read in lines of the form:<br />

property_name=property_values<br />

When retrieving information from a file, the Properties class does a keyword search on<br />

the property name, so properties can be specified in any order in the file, one line per<br />

property.<br />

The properties implemented by EC1 are:<br />

Landscape= ...<br />

PopSize=<br />

Mutation= ...<br />

SimLimit=<br />

RandSeed=<br />

Report=<br />

So, for example, a typical configuration file might be:<br />

Landscape=RVP Parabola 2 -4.0 6.0 soft - 50.0<br />

PopSize=10<br />

Mutation=gaussian 2.0<br />

SimLimit=1000<br />

RandSeed=123456789<br />

Report=full<br />

which specifies the general class of landscape to be RVP (real-valued parameter); the particular<br />

landscape of type Parabola; the particular parabola is 2-dimensional with initial<br />

lower/upper parameter bounds of -4.0 and 6.0; the initial bounds are soft (not hard), meaning<br />

that an EA is allowed to explore outside them; and the parabola is inverted (-) with a<br />

maximum value of 50.0.<br />

In addition, a population size of 10 is to be used, and the mutation operator to be used<br />

is Gaussian with an average step size of 2.0. The simulation is to be run for 1000 births<br />

(100 generations), the pseudo-random number generator is to be initialized with the seed<br />

value 123456789, and a full report of the simulation is to be generated.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!