Closed schrum2 closed 1 year ago
This is actually slightly different from change block fitness, and deserves a bit of attention of its own
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.
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
We've done a lot of experiments with it, and it is promising
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.