if anyone is interested in measuring the diversity for CoEvolution or any "MultiPopulationBasedAlgorithm"
It takes the average of all the sub populations. ie. in the below example it will take the average diversity from all of the 5 sub PSO's
<algorithm id="coop-pso" class="coevolution.cooperative.CooperativeCoevolutionAlgorithm">
<addPopulationBasedAlgorithm idref="pso-E20"/>
<addPopulationBasedAlgorithm idref="pso-E20"/>
<addPopulationBasedAlgorithm idref="pso-E20"/>
<addPopulationBasedAlgorithm idref="pso-E20"/>
<addPopulationBasedAlgorithm idref="pso-E20"/>
</algorithm>
Add the attached file to cilib\src\main\java\net\sourceforge\cilib\measurement\single directory.
In the XML file make use of <addMeasurement class="measurement.single.DiversityCo"/>
NOTE: this makes use of the "measurement.single.Diversity" for the calculations. It is in essence a wrapper for "measurement.single.Diversity".
Therefore you can simply replace the "measurement.single.Diversity" with "measurement.single.DiversityCo" and it will work on any of the standard Algorithms that "measurement.single.Diversity" works on. ie It will work for any SinglePopulationBasedAlgorithm such as"pso.PSO" and MultiPopulationBasedAlgorithms such as "CooperativeCoevolutionAlgorithm".
