<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to ProgrammingFitnessFunction</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>Recent changes to ProgrammingFitnessFunction</description><atom:link href="https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 02 May 2025 07:31:01 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for ProgrammingFitnessFunction page</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/?limit=25#ce37</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It`s interesting.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Derrick Bozem</dc:creator><pubDate>Fri, 02 May 2025 07:31:01 -0000</pubDate><guid>https://sourceforge.net0e7f37bc5cc5fe5d50ee092b76affb9e82525fdc</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Fri, 20 Nov 2015 10:22:13 -0000</pubDate><guid>https://sourceforge.net6c71eda1440f8358aa2a51e962dda12a23bec322</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Tue, 17 Nov 2015 13:59:41 -0000</pubDate><guid>https://sourceforge.net62cce6b0f6221c4bfc96268361a4e54fe878248e</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v18
+++ v19
@@ -1,4 +1,4 @@
-[Prev: iCub robots]([iCubRobot]) | [Up: Home]([Home]) | [Next: Writing tests for evolutionary experiments]([EvorobotExperimentTest])
+[Prev: The iCub robot]([iCubRobot]) | [Up: Home]([Home]) | [Next: Writing tests for evolutionary experiments]([EvorobotExperimentTest])
  -------|--------|----------
         |        |

@@ -9,58 +9,63 @@
 Programming a Fitness Function
 ======

-For evolutionary experiments you need to implement your own fitness function. To set the fitness of the current individual genotype you simply has to set the value of the *totalFitnessValue* variable. 
+For evolutionary experiments you need to implement your own fitness function. When you use the *EvoRobotExperiment* component, to set the fitness of the current individual genotype you simply have to set the value of the *totalFitnessValue* member variable. In this page we assume that your experiment makes use of a subclass of *EvoRobotExperiment*

-In the case of robotic experiments, tipically the fitness depends on the state of the robot and of the environmemt. For information on how to access to the relevant variables that you need, see the section 3 and 4 of this part of the documentation. 
+In the case of robotic experiments, tipically the fitness depends on the state of the robot and of the environmemt. For information on how to access to the relevant variables that you need, see the sections on [robots]([CustomizingRobots]) and the [environment]([CustomizeEnvironment]) of this section of the documentation.

-Depending on the type of experiment that you are implementing, you might decide compute the fitness function and/or to update the *totalFitnessValue* variable after each step, after each trial, or after all evaluation trials. If your experiment is based on the EvoRobotExperiment class, this means that you can do that in the *endStep()* ,*endTrial()*, or *endIndividual()* functions. For example, in the case of a robot that should move as quickly as possible and as straight as possible, it might be convenient to update the fitness value at the end of any step on the basis of the current speed of the robot’s wheels. In the case of a foraging robot, that should find and ingest food sources, the fitness might be increased every time the robot manages to ingest a food token. In the case of a robot that should reach a certain desired location, it might be update at the end of each trial. In some case it might be useful to normalize the fitness value by dividing the total fitness for the number of trials and eventually for the number of steps. In any case, what matter for the evolutionary process, is the value of the fitness achieved at the end of the individual lifetime, that is stored in the *totalFitnessValue* variable.
+Depending on the type of experiment that you are implementing, you might decide to compute the fitness function and/or to update the *totalFitnessValue* variable after each step, after each trial, or after the evaluation of all trials. This means that you can do that in the *endStep()*, *endTrial()* or *endIndividual()* functions. For example, in the case of a robot that should move as quickly as possible and as straight as possible, it might be convenient to update the fitness value at the end of each step on the basis of the current speed of the robot’s wheels. In the case of a foraging robot, that should find and ingest food sources, the fitness might be increased every time the robot manages to ingest a food token. In the case of a robot that should reach a certain desired location, it might be update at the end of each trial. In some cases it might be useful to normalize the fitness value by dividing the total fitness for the number of trials and eventually for the number of steps. In any case, what matters for the evolutionary process, is the value of the fitness achieved at the end of the individual lifetime, that is stored in the *totalFitnessValue* variable.

-The following portion of code extracted from the *KheperaDiscriminationExperiment* experimental plugin illustrate an example of how a fitness function can be implemented. This experiment involves a wheeled robot situated in an arena containing a cylindrical object. The calculation of the fitness requires to access to the robot and arena components in order to verify whether the distance between the robot and the cylinder is lower than a given threshold at the end of each trial. The instructions for updating the *totalFitnessValue* variables are included in the *endTrial()* method, as shown below. The instructions enclosed in the *endIndividual()* method are used to calculate the normalize the fitness obtained for the number or trials performed. 
+The following portion of code extracted from the *KheperaDiscriminationExperiment* experimental plugin, illustrates an example of how a fitness function can be implemented. This experiment involves a wheeled robot situated in an arena containing a cylindrical object. The calculation of the fitness requires to access the robot and arena components in order to verify whether the distance between the robot and the cylinder is lower than a given threshold at the end of each step. The variable containing the fitness for the current trial (*trialFitnessValue*) is reset at the beginning of the trial and updated at the end of each step. The instructions for updating the *totalFitnessValue* variable are included in the *endTrial()* method, as shown below. The instructions in the *endIndividual()* method are used to normalize the fitness obtained by the number or trials performed.

 ~~~~~~~
 :::C++
-// We increase the fitness of the robot with 1 point every time
-// it is located near the cylindrical object at the end of the trial
-// and it is not colliding with obstacles.
-// m_object is a pointer to the cylindrical object created in the
-// postConfigureInitialization() method
+void KheperaDiscriminationExperiment::initTrial(int trial)
+{
+   ...
+   // Resetting fitness for the current trial
+   trialFitnessValue = 0;
+}
+
+void KheperaDiscriminationExperiment::endStep(int step)
+{
+   farsa::ResourcesLocker locker(this);
+   farsa::RobotOnPlane* robot = getResource&amp;lt;farsa::RobotOnPlane&amp;gt;("agent[0]:robot");
+   const farsa::Arena* arena = getResource&amp;lt;farsa::Arena&amp;gt;("arena");
+
+   // If robot collided with something, stopping the trial
+   if (arena-&amp;gt;getKinematicRobotCollisionsSet("agent[0]:robot").size() != 0) {
+       stopTrial();
+
+       return;
+   }
+
+   // Computing the distance of the robot with the object
+   const farsa::real distance = robotObjectDistance(robot);
+
+   if (distance &amp;lt; m_distanceThreshold) {
+       trialFitnessValue += 1.0;
+   }
+}
+
 void KheperaDiscriminationExperiment::endTrial(int trial)
 {
-    // We acquire the resource lock before accessing the robot and arena
-    farsa::ResourcesLocker locker(this);
-    farsa::RobotOnPlane* robot = getResource&amp;lt;farsa::RobotOnPlane&amp;gt;("agent[0]:robot");
-    const farsa::Arena* arena = getResource&amp;lt;farsa::Arena&amp;gt;("arena");
-
-    // The fitness is increased if the robot is not colliding and is near 
-    // (i.e distance &amp;lt; 10cm) the cylinder
-    if (arena-&amp;gt;getKinematicRobotCollisions("agent[0]:robot").size() == 0) {
-        farsa::wVector robotPosition(robot-&amp;gt;position().x, robot-&amp;gt;position().y, 0.0);
-        farsa::wVector objectPosition(m_object-&amp;gt;position().x, m_object-&amp;gt;position().y, 0.0);
-        farsa::real distance = (robotPosition - objectPosition).norm() - robot-&amp;gt;robotRadius() - m_object-&amp;gt;phyObject()-&amp;gt;radius();
-        if (distance &amp;lt; 0.1) {
-            trialFitnessValue += 1.0; 
-        }
-    } 
-
-    totalFitnessValue += trialFitnessValue;
+   totalFitnessValue += trialFitnessValue / getNSteps();
 }

-// We normalize the fitness for the number of trials
 void KheperaDiscriminationExperiment::endIndividual(int individual)
 {
-    totalFitnessValue = totalFitnessValue / getNTrials();
+   totalFitnessValue = totalFitnessValue / getNTrials();
 }
 ~~~~~~~

-
-The following portion of code extracted from the *GraspExperiment* experimental plugin which involve an iCub robot trained for the ability to reach, grasp, and evelate a ball initially laying over a table. The code that compute the fitness value of the carrend individual is included in the *endStep()* method. In this case the computation of the fitness is relatively complex since the fitness function involve several component (i.e. the robot is rewarded not only on the basis of whether the ball has been successfully elevated with respect to the plane but also on the basis of whether it is able to reach the ball with the hand, to touch it, etc.). For this reason the source code of the experimental plugin includes a series of sub-functions that receives a pointer to the icub robot and update the value of each corresponding component.
+The following portion of code is extracted from the *GraspExperiment* experimental plugin, which involves an iCub robot trained for the ability to reach, grasp, and elevate a ball initially laying over a table. The code that computes the fitness value of the current individual is included in the *endStep()* method. In this case the computation of the fitness is relatively complex since the fitness function involves several components (i.e. the robot is rewarded not only on the basis of whether the ball has been successfully elevated with respect to the plane, but also on the basis of whether it is able to reach the ball with the hand, to touch it, etc.). For this reason the source code of the experimental plugin includes a series of sub-functions that receive a pointer to the icub robot and update the value of each corresponding component.

 ~~~~~~~
 :::C++
 void GraspExperiment::endStep(int step)
 {
     ...
-    
+
     // Updating all fitness components
     update_CommonComponentsValues(icub);
     update_DistComponent(icub);
@@ -85,4 +90,3 @@
     ...
 }
 ~~~~~~~
-
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Sat, 14 Nov 2015 08:53:15 -0000</pubDate><guid>https://sourceforge.net9561a25b8d4aa473d10aa6938adf2268932412a2</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Fri, 13 Nov 2015 10:31:57 -0000</pubDate><guid>https://sourceforge.netae34f5c7e42056583d8a25a8685537fd548e0edc</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v16
+++ v17
@@ -1,4 +1,4 @@
-[Prev: iCub robots]([iCubRobot]) |  | [Next: Writing tests for evolutionary experiments]([EvorobotExperimentTest])
+[Prev: iCub robots]([iCubRobot]) | [Up: Home]([Home]) | [Next: Writing tests for evolutionary experiments]([EvorobotExperimentTest])
  -------|--------|----------
         |        |

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Thu, 12 Nov 2015 10:36:54 -0000</pubDate><guid>https://sourceforge.netaf5b74f2355c9c08c7ed73ff2ba8d5d6d4f24c78</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v15
+++ v16
@@ -1,3 +1,11 @@
+[Prev: iCub robots]([iCubRobot]) |  | [Next: Writing tests for evolutionary experiments]([EvorobotExperimentTest])
+ -------|--------|----------
+        |        |
+
+**Table of contents**
+
+[TOC]
+
 Programming a Fitness Function
 ======

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Thu, 12 Nov 2015 10:21:47 -0000</pubDate><guid>https://sourceforge.net4d4fd20e5be6a955b2b1d6581cf665f644feae93</guid></item><item><title>ProgrammingFitnessFunction modified by Stefano Nolfi</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v14
+++ v15
@@ -1,31 +1,13 @@
 Programming a Fitness Function
 ======

-This page shows how to create evolutionary experiment in FARSA using the *Evoga* and *EvoRobotExperiment* components. We will concentrate on how to write a fitness function; information on how to implement a custom evolutionary algorithm can be found in  [this page]([Create a custom evolutionary algorithm]).
+For evolutionary experiments you need to implement your own fitness function. To set the fitness of the current individual genotype you simply has to set the value of the *totalFitnessValue* variable. 

-Introduction
--------
+In the case of robotic experiments, tipically the fitness depends on the state of the robot and of the environmemt. For information on how to access to the relevant variables that you need, see the section 3 and 4 of this part of the documentation. 

-If you want to run a new type of evolutionary experiment, you very likely need to program a new fitness function (i.e. a function that rate to what extent evolving robots are adapted to the a given task/environment). In FARSA the *Evoga* component provides several types of genetic algorithms that are ready to use. To work correctly, this component expects a subcomponent of type *EvoRobotExperiment*, which contains the code to evaluate the fitness of a genotype. After a brief overview of *EvoRobotExperiment*, we will show two examples of how to create a subclass to implement a custom fitness function.
+Depending on the type of experiment that you are implementing, you might decide compute the fitness function and/or to update the *totalFitnessValue* variable after each step, after each trial, or after all evaluation trials. If your experiment is based on the EvoRobotExperiment class, this means that you can do that in the *endStep()* ,*endTrial()*, or *endIndividual()* functions. For example, in the case of a robot that should move as quickly as possible and as straight as possible, it might be convenient to update the fitness value at the end of any step on the basis of the current speed of the robot’s wheels. In the case of a foraging robot, that should find and ingest food sources, the fitness might be increased every time the robot manages to ingest a food token. In the case of a robot that should reach a certain desired location, it might be update at the end of each trial. In some case it might be useful to normalize the fitness value by dividing the total fitness for the number of trials and eventually for the number of steps. In any case, what matter for the evolutionary process, is the value of the fitness achieved at the end of the individual lifetime, that is stored in the *totalFitnessValue* variable.

-The *EvoRobotExperiment* class
--------
-
-To evaluate the fitness of a genotype, the *Evoga* component uses a subcomponent of type *EvoRobotExperiment*. This class contains code to quickly setup a robotic experiment. In fact, it automatically creates a simulated world and one or more robots (depending on the configuration parameters and subcomponents). [This page]([CreatingNewExperiment]) has more information on some of the functions provided by the *EvoRobotExperiment* class. Here we will show which are the virtual functions that are called by *Evoga* at different moments during a simulation that can be used to calculate the value of a fitness function. The evaluation of a genotype is organized in different *trials*, each one made up of one or more *steps*. Here is a list of the functions called by *Evoga* (see [API documentation]([APIDoc]) for full documentation):
-
-* *virtual void initIndividual(int individual)* - called before starting the evaluation of the genotype (more precisely: of the phenotype corresponding to the current genotype);
-* *virtual void initTrial(int trial)* - called before starting an evaluation trial;
-* *virtual void initStep(int step)* - called before every simulation step;
-* *virtual void endStep(int step)* - called after every simulation step;
-* *virtual void endTrial(int trial)* - called after the end of an evaluation trial;
-* *virtual void endIndividual(int individual)* - called after the evaluation of the genotype has finished.
-
-Which functions to implement depends on the particular fitness function (with the exception of the *endStep* function which is pure virtual and must always be implemented). For example, in the case of a robot that should move as quickly as possible and as straight as possible, it might be convenient to update the fitness value at the end of any step on the basis of the current speed of the robot’s wheels. In the case of a foraging robot, that should find and ingest food sources, it might be increased every time the robot manages to ingest a food token. In the case of a robot that should reach a certain desired location, it might be update at the end of each trial. In some case it might be useful to normalize the fitness value by dividing the total fitness for the number of trials and eventually for the number of steps. In any case, what matter for the evolutionary process, is the value of the fitness achieved at the end of the individual lifetime, that is stored in the *totalFitnessValue* variable.
-
-Example 1
--------
-
-This example is taken from *KheperaDiscriminationExperiment* (with some simplifications), one of the exemplificative experiments distributed together with FARSA. This experiment involves a wheeled robot situated in an arena containing a cylindrical object and the calculation of the fitness requires to access to the robot and arena components to verify whether the distance between the robot and the cylinder at the end of each trial is lower than a given threshold. Since in this case the value of the fitness is modified at end of the trial, the instructions for updating the *totalFitnessValue* variables are included in the endTrial() method, as reported below. Moreover, The *endIndividual()* method is used to normalize the fitness for the number of trials:
+The following portion of code extracted from the *KheperaDiscriminationExperiment* experimental plugin illustrate an example of how a fitness function can be implemented. This experiment involves a wheeled robot situated in an arena containing a cylindrical object. The calculation of the fitness requires to access to the robot and arena components in order to verify whether the distance between the robot and the cylinder is lower than a given threshold at the end of each trial. The instructions for updating the *totalFitnessValue* variables are included in the *endTrial()* method, as shown below. The instructions enclosed in the *endIndividual()* method are used to calculate the normalize the fitness obtained for the number or trials performed. 

 ~~~~~~~
 :::C++
@@ -62,10 +44,8 @@
 }
 ~~~~~~~

-Example 2
--------

-In the case of the *GraspExperiment* the code for calculation of the fitness function is included instead in the *endStep()* method. In the case of this experiment the computation of the fitness is relatively complex since it includes the calculation of several fitness components. For this reason the source code includes a series of sub-functions that receives a pointer to the icub robot and update the value of each corresponding component.
+The following portion of code extracted from the *GraspExperiment* experimental plugin which involve an iCub robot trained for the ability to reach, grasp, and evelate a ball initially laying over a table. The code that compute the fitness value of the carrend individual is included in the *endStep()* method. In this case the computation of the fitness is relatively complex since the fitness function involve several component (i.e. the robot is rewarded not only on the basis of whether the ball has been successfully elevated with respect to the plane but also on the basis of whether it is able to reach the ball with the hand, to touch it, etc.). For this reason the source code of the experimental plugin includes a series of sub-functions that receives a pointer to the icub robot and update the value of each corresponding component.

 ~~~~~~~
 :::C++
@@ -98,13 +78,3 @@
 }
 ~~~~~~~

-Fitness is computed 20 time steps before the end of the trial because at that point the effect of the physical collisions with the table are disabled by turning the table into a kinematic object, using the following instructions:
-
-~~~~~~~
-:::C++
-if (!icub-&amp;gt;isKinematic()) {
-    m_table-&amp;gt;setKinematic(true);
-}
-~~~~~~~
-
-This trick is used to verify whether the sphere remains elevated over the table plane even after the support of the table is eliminated (i.e. to verify whether the robot reliably hold the sphere in its hand). Once this check is performed, the fitness might be further increased or not (at the very end of the trial) depending on whether or not the holding test has been passed. 
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefano Nolfi</dc:creator><pubDate>Wed, 28 Oct 2015 15:13:32 -0000</pubDate><guid>https://sourceforge.net735584923e47c85b1727a5e89bb1c257ecbc4172</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -3,7 +3,7 @@

 This page shows how to create evolutionary experiment in FARSA using the *Evoga* and *EvoRobotExperiment* components. We will concentrate on how to write a fitness function; information on how to implement a custom evolutionary algorithm can be found in  [this page]([Create a custom evolutionary algorithm]).

-Overview
+Introduction
 -------

 If you want to run a new type of evolutionary experiment, you very likely need to program a new fitness function (i.e. a function that rate to what extent evolving robots are adapted to the a given task/environment). In FARSA the *Evoga* component provides several types of genetic algorithms that are ready to use. To work correctly, this component expects a subcomponent of type *EvoRobotExperiment*, which contains the code to evaluate the fitness of a genotype. After a brief overview of *EvoRobotExperiment*, we will show two examples of how to create a subclass to implement a custom fitness function.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Wed, 21 Oct 2015 14:13:10 -0000</pubDate><guid>https://sourceforge.net4d50271e7dbeee210c12b91533ebf085295d36c3</guid></item><item><title>ProgrammingFitnessFunction modified by Tomassino Ferrauto</title><link>https://sourceforge.net/p/farsa/wiki/ProgrammingFitnessFunction/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v12
+++ v13
@@ -11,7 +11,7 @@
 The *EvoRobotExperiment* class
 -------

-To evaluate the fitness of a genotype, the *Evoga* component uses a subcomponent of type *EvoRobotExperiment*. This class contains code to quickly setup a robotic experiment. In fact, it automatically creates a simulated world and one or more robots (depending on the configuration parameters and subcomponents). [This page]([CreatingNewExperiment]) has more information on some of the functions provided by the *EvoRobotExperiment* class. Here we will show which are the virtual functions that are called by *Evoga* at different moments during a simulation that can be used to calculate the value of a fitness function. The evaluation of a genotype is organized in different *trials*, each one made up of one or more *steps*. Here is a list of the functions called by *Evoga* (see API reference for full documentation):
+To evaluate the fitness of a genotype, the *Evoga* component uses a subcomponent of type *EvoRobotExperiment*. This class contains code to quickly setup a robotic experiment. In fact, it automatically creates a simulated world and one or more robots (depending on the configuration parameters and subcomponents). [This page]([CreatingNewExperiment]) has more information on some of the functions provided by the *EvoRobotExperiment* class. Here we will show which are the virtual functions that are called by *Evoga* at different moments during a simulation that can be used to calculate the value of a fitness function. The evaluation of a genotype is organized in different *trials*, each one made up of one or more *steps*. Here is a list of the functions called by *Evoga* (see [API documentation]([APIDoc]) for full documentation):

 * *virtual void initIndividual(int individual)* - called before starting the evaluation of the genotype (more precisely: of the phenotype corresponding to the current genotype);
 * *virtual void initTrial(int trial)* - called before starting an evaluation trial;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomassino Ferrauto</dc:creator><pubDate>Wed, 21 Oct 2015 11:45:23 -0000</pubDate><guid>https://sourceforge.net84620c487980fdc645f70ea80e3bcf2d8f14e04e</guid></item></channel></rss>