[EvA] EVA2 framework

Marcel Kronfeld marcel.kronfeld at uni-tuebingen.de
Mon Mar 28 18:13:26 CEST 2011


Andrew Koh wrote:
> Thank you for providing the EVA2 framework available for academic
research under the LGPL.
> I have found it very useful for testing of several algorithms.
> I am using the MATLAB interface to call the EvA2 engine partially
because I do not program in JAVA and also my original code was written
in MATLAB.
> I have managed to get this to work:
> 1)      Create the java interface object (what you call JI)
> 2)      Show the available optimizers using >>  showOptimizers(JI)
> 3)      Issue the command to run after choosing the optimizer >>
JI=optimize(JI, 4);
> However, I would like to know how I can change parameters in the
chosen optimizer and modify the termination criteria say.
> For example, I wanted to run a GA with a population of 50 and
probability of crossover of 0.95 say and mutation of 0.05
>
> I know that JI=optimize(JI, 3) will use a GA, but where can I proceed
to modify the parameters used from the defaults and what are the
defaults in any case?
> How can I do that within the MATLAB commands or is that not possible?
> Thank you very much for your help.

Dear Mr. Koh,

thanks for your interest in EvA2. You may use "optimizeWith" from Matlab
to influence main optimization parameters. Note however that due to the
hierarchical class structure, some parameters require accessing nested
objects of the optimizer. The mutation probability, for example, is
represented within the solution representation type (an individual). You
may learn about that structure by either clicking through the EvA2 GUI a
bit or by using the getDesc method in the Matlab interface, which I
updated in the online version to this end, so you should download the
latest distribution.
Your example should then work as follows from within Matlab:

... % (create the JI object)
indy=getIndividualTemplate(JI); % access the individual type
getDesc(JI,3); % show direct properties of GA
getDesc(JI, indy, 1); % show indy properties and default settings...
WARNING: this call only works with the latest version. For any member
"propertyX" a setter method "setPropertyX" can be assumed:
indy.setMutationProbability(0.05);
indy.setCrossoverProbability(0.95);
% You may also change crossover/mutation operators at this point.
Available operators are best inspected through the GUI.
% Now start the run defining a pop. size of 50 -- you could also specify
a selection method at this point (e.g. through the 'parentSelection'
property as indicated by getDesc(JI,3);
JE=optimizeWith(JE, 3, 'population',
eva2.server.go.populations.Population(50));

Please notify me if this works as desired. Further notes on termination
criteria are in the ShortDoc linked on the EvA2 web site. If you require
more sophisticated termination criteria, you might describe them more
explicitly for further hints.

Best regards,
 Marcel Kronfeld

-- 
 Dipl.-Inform. Marcel Kronfeld
 Wilhelm-Schickard-Institute for Computer Science
 University of Tuebingen
 Sand 1 - A305, 72076 Tuebingen, Germany

 Phone: (+49/0)-7071-29-78987, Fax: (+49/0)-7071-29-5091
 EMail: marcel.kronfeld at uni-tuebingen.de


More information about the EvA mailing list