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

Multiobjective Optimization for Minecraft #884

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

In theory, this should already work, though there are not really batch files for it. The ones from GECCO for pure fitness can be easily augmented to include multiple fitness functions. However, I anticipate a problem if we use multiple fitness functions that extend the TimedEvaluationMinecraftFitnessFunction, since each one spawns the shape into the world. We want to spawn the shape once, but get multiple evaluation metrics for it.

I think a good starting point for this it so combine the standard flying machine fitness (change in center of mass) with the maximize volume fitness.

schrum2 commented 1 year ago

Just need to fix the unsupported operation exception in MinecraftShapeTask by calling the new multipleFitnessScores method, and then this can be tested

schrum2 commented 1 year ago

@JoannaBlatt Replace the exception that is thrown in MinecraftShapeTask.calculateFitnessScores with a call to TimedEvaluationMinecraftFitnessFunction.multipleFitnessScores and return that result. Then Maven install and test with the batch file batch\Experiments-2023-MinecraftMultiobjective\MinecraftAccumulate-NSGA2-Observer-FlyVsVolume.bat

schrum2 commented 1 year ago

There is an error with the Max Volume Fitness that needs to be addressed in issue #888

So instead, test the multiobjective functionality with a different batch file. Instead of MinecraftAccumulate-NSGA2-Observer-FlyVsVolume.bat, make a similar batch file that does FlyVsMissile

schrum2 commented 1 year ago

The FlyVsMissile batch file successfully runs now, but the fitness calculations are messed up because change in center of mass thinks that a machine is flying if it blows itself up, since all it can see is that the blocks are no longer there. This means that these particular fitness functions cannot be combined in their current form. Might need to make change in center of mass more restrictive by having it verify that the shape has a history of moving gradually away before suddenly disappearing in an explosion.

In the meantime, might be able to test FlyVsVolume soon once #888 is fixed

schrum2 commented 1 year ago

Multiobjective evolution works. There will likely be many issues with specific fitness functions going forward, but this issue can be closed.