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

Search the space of genotypes #894

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

We're having trouble simply searching the space of possible genotypes, as evidenced by #885 . We need some tests that simply try to fill the archive, but use a trivial fitness function.

Make a fitness function for Minecraft that simply returns a random number (Use RandomNumbers.randomGenerator), and combine it with the Piston vs Air archive.

Also, before running this, we should find a way to run it faster. This fitness function doesn't actually require the Minecraft server to run, or the MinecraftClient for that matter. Only the TimedEvaluationMinecraftFitnessFunctions actually need simulation. So, there are two parts to this.

Modify the constructor for MinecraftShapeTask so that it gets the fitness functions before checking the client and the server, and only bothers to initialize them if there are some TimedEvaluationMinecraftFitnessFunctions. The fitness functions that don't use TimedEvaluationMinecraftFitnessFunction won't even spawn blocks, so evolution should run faster.

Test this change first, and then make a simply random fitness function, and execute that with the Air vs Piston bins as indicated.

schrum2 commented 1 year ago

Fitness functions that don't use the timed evaluation now run much faster, and the random fitness function has been implemented.

However, this just allows us to quickly confirm that evolution is not doing a great job searching the space of possible genotypes.

It's possible that a different encoding #886 could help, though we may also want to investigate different search algorithms. I'll make new issues about this as I think of them.