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

AccumulateNewBlockPositionsFitness #897

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

Idea for a new fitness function that uses the timed evaluation fitness as a base.

When calculating the final score, have a HashSet<MinecraftCoordinate>. For each shape in the history, loop through all the blocks in each shape, and add their location to this set. The set does not allow duplicates, so any attempt to add a location that is already present will be ignored. After the loop is finished, the score would be the size of the set, since it will only contain all the unique locations where there was a block.

This fitness should also override the optional early termination condition so that if the shape is empty or not moving at all, you return a result which is the final score calculation early.

schrum2 commented 1 year ago

This is actually slightly different from change block fitness, and deserves a bit of attention of its own

schrum2 commented 1 year ago

Merge my branch to get a small fix to this, then test it out by making a batch file as described in the last commit message. You probably need code in MinecraftShapeTask's define fitness function method to setup the use of the fitness function as well.

schrum2 commented 1 year ago

I don't get the sense that this had been sufficiently tested yet. I suppose testing this could warrant the setting up of a few more machines in the lab @TjRaffert

schrum2 commented 1 year ago

We've done a lot of experiments with it, and it is promising