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

TypeTargetFitness for Minecraft in Java #762

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

Make a class TypeTargetFitness in the package edu.southwestern.tasks.evocraft.fitness that extends CheckBlocksInSpaceFitness in a manner similar to TypeCountFitness.

Then add code in the constructor of MinecraftShapeTask that registers the new fitness function. You will need to define a command line parameter to indicate that this fitness function is being used, and a separate command line parameter that identifies the desired target count.

alejmedinajr commented 2 years ago

The new class has been created similarly to TypeCountFitness. New code has also been added to the constructor of MinecraftShapeTask that I think registers the new fitness function. The code needs to be refactored though, so that it does not repeat the code to count how many blocks of a desired block there are.

alejmedinajr commented 2 years ago

The code is now refactored, and the code to count the number of blocks is no longer being repeated unnecessarily. I also forgot to include a new command line parameter, that is now included with this new commit.