schrum2 / MM-NEAT

Modular Multiobjective (Hyper) Neuro-Evolution of Augmenting Topologies + MAP-Elites: Java code for evolving intelligent agents in Ms. Pac-Man, Tetris, and more, as well as code for Procedural Content Generation in Mario, Zelda, Minecraft, and more!
http://people.southwestern.edu/~schrum2/re/mm-neat.php
Other
50 stars 20 forks source link

Make it easy to calculate a hypervolume #917

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

This will tie in with #891

Make a class edu.southwestern.util.MultiobjectiveUtil that has some methods for computing Pareto fronts. Use the class jmetal.qualityIndicator.Hypervolume but make the interface better. In particular, we want methods like this:

public static double hypervolumeFromParetoFront(List<Score> scores)

and

public static double hypervolumeFromPopulation(List<Score> scores)

The main difference with this second one is that the population may not be a Pareto front yet, and this the population will need to be filtered down to only the members of the Pareto front first.

JoannaBlatt commented 1 year ago

We could also have a log that tracked the hypervolume for each individual bin's Pareto fronts.

By the way, you can calculate hypervolume using jmetal.qualityIndicator.Hypervolume. However, I believe the only other example of how to use this that exists in the code reads the data from a text file rather than directly from an array or list of scores, so a little bit of data manipulation is needed. However, this code is not well documented (it came from some other research project, and honestly I haven't used it much). You will definitely need to use the calculateHypervolume method. This assumes you have a 2D array of scores that already represents scores from a Pareto front. However, the more I look at this, I'm realizing that we need a whole separate issue for making it easy to calculate a hypervolume, so I'll make that and refer to it here https://github.com/schrum2/MM-NEAT/issues/917.

schrum2 commented 1 year ago

Let's do some simple unit tests of this. For example, the hypervolume of a population with just one member should be the product of all the objectives. You could also set up a simple 2-objective example with just two points, and figure out how the two boxes would interact in 2D to determine the appropriate volume.

JoannaBlatt commented 1 year ago

Created unit tests which passed as expected