Closed schrum2 closed 1 year ago
This should be easier than some of the other fitness function tasks you have assigned. Just be sure to make use of what @JoannaBlatt has produced in #870 . You may need to merge the latest version of dev_Joanna
before starting on this.
Created fitness function for rewarding Volume created MaximizeVolumeFitness. I also added maxCoordinates in the MinecraftUtilClass to be used on MaximizeVolumeFitness.
Let's keep this issue open until you have successfully run some experiments based on a batch file that uses this new fitness function
I ran it on several machines and didn't get any flying machines. I believe this is because it encourages filling the cube with as many blocks as possible. This makes it harder for a flying machine to appear because the shape will almost immediately exceed the max block count of a single piston.
I think the fitness function we are using here makes sense, so we need to think of different behavior characterizations that could help. Perhaps one dimension of a behavior characterization could be based on the amount of movement the shape exhibits. If we can get this idea out of the brainstorming phase, then it deserves its own issue
I ran MaxVolume it had no flying machines maxed out its space early on. Fitness never exceeds 500 which is what we saw with earlier tests. But it had encouraging oscillating behavior that we can reward to hopefully get bigger or more flying machines.
I ran 2 MaxVolume10Dim. Neither machine has finished yet, but it is pretty clear to see that they are just pushing out as much as they can in each direction.
MaxVolume10Dim never had fitness of 900 or above.
It's clear that we are failing to evolve flying machines with this fitness function, and we have already hypothesized that encouraging movement could help. However, first I want to verify that if we had flying machines, that they should earn a high fitness score. In particular, one shape that produces machines flying in two different directions should earn a high score, but to start simple let's just work with a machine flying in one direction.
I've transferred this to @JoannaBlatt since she already has some experience with these unit tests. Make a unit test for this fitness function (MaximizeVolumeFitness
) that verifies the fitness assigned to a regular flying machine makes sense. Once that works, have a shape that instantiated flying machines in two different directions, and verify that the resulting fitness is even higher!
Can't actually do this until #888 is fixed
This seems to have been fixed, but all previous preliminary results are invalidated. In fact, I think an actual flying machine could have earned a low fitness due to the previous error. So, we need to re-run experiments with maximize volume to see how it does.
Clarification for @JoannaBlatt regarding what is required before this issue can be closed:
Make a unit test for this fitness function (MaximizeVolumeFitness
). First verify the fitness for a static shape. Then verify the fitness assigned to a regular flying machine makes sense. Once that works, have a shape that instantiates flying machines in two different directions, and verify that the resulting fitness is even higher!
Side note: combining maximize volume with change in center of mass via multiobjective evolution seems to have made some larger flying machines. So, all we need is unit tests, and then I'm ok closing this.
Unit tests finished and functional.
It seems like the big flying machines only use a portion of their blocks to make a flying machine. This is disappointing, but it begs the question of if there are enough blocks to make machines flying in different directions.
Make a new fitness function
MaximizeVolumeFitness
that extends theTimedEvaluationMinecraftFitnessFunction
that is being made #870 . ThecalculateFinalScore
method within it will be defined to look over all blocks in all shapes in the history and calculate the minimum and maximum x, y, and z coordinates. The goal is to figure out the size of the space that the shape encompasses.The final fitness will be the difference in max/min x, multiplied by the differences in max/min y and max/min z.