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

Fitness-based Flying Machine Evolution #824

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

Initially we had a hard time evolving flying machines. Then we made a bunch of changes to the genome representation, fitness function, etc while also happening to use MAP Elites, and we were successful. However, maybe we could just evolve flying machines with a simple fitness-based evolutionary algorithm now that we have changed other things.

Make some batch files in a new batch subdir that use the MinecraftShapeTask (not the Loner version) to evolve using the accumulate version of change in center of mass. Shapes should use the vector-to-volume mapping, and generally have settings that match our previous successful MAP Elites runs, but not using MAP Elites. Don't set the "ea" parameter and it will default to a simple evolution strategy.

We might also want to make some batch files that use CMA-ES, but make the simpler one described above first

schrum2 commented 2 years ago

This is actually a fairly high priority issue. We need to verify that using MAP Elites actually matters, and that we couldn't have done something simpler instead

richeyme commented 2 years ago

It takes a very long time to evaluate the parents and the children for a single generation. May need to change something with the parallelism.

schrum2 commented 2 years ago

This seems to have produced flying machines over the weekend, so it is worth the effort to make it run a bit faster

schrum2 commented 2 years ago

Being tested with a new batch file.

schrum2 commented 2 years ago

Hopefully this worked without crashing (report if otherwise).

Before we close the issue, make and test a similar batch file where the "ea" is set to the class "CMAEvolutionStrategyEA" (with the full package path). Some other settings may be needed as well to make this really work.

alejmedinajr commented 2 years ago

image Test run did produce flying machines, but the max fitness rewarded was close to 8 even though minecraftAccumulateChangeInCenterOfMass:true was set. This would normally lead to a higher max fitness.

schrum2 commented 2 years ago

The fitness scores here suggest the need for unit tests on the maxFitness, and that issue is tracked here: #830

However, this particular issue seems to be resolved. I made the CMA-ES batch file, and it is currently being tested, and seems to be running fine. If something crashes we'll re-open the issue, but for now I'm closing this.