Closed schrum2 closed 2 years ago
Anyone can work on this, and it doesn't necessarily need to be together. Whoever has time should work on it
Finished writing the fitness functions for each of the orientation pairs.
@richeyme should work on #823 instead. @alejmedinajr can work on this with @MuellMark
@richeyme is back!
The new binning scheme has been created, and it will start to be tested (it seems to be working).
Started a test run for the new binning scheme, will leave it running overnight.
Exception in thread "Thread-5" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4146
at java.util.Vector.get(Unknown Source)
at edu.southwestern.evolution.mapelites.Archive.getElite(Archive.java:296)
at edu.southwestern.evolution.mapelites.Archive.getBinScore(Archive.java:306)
at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.placeArchiveInWorld(MinecraftLonerShapeTask.java:313)
at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.placeArchiveInWorld(MinecraftLonerShapeTask.java:298)
at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.oneEval(MinecraftLonerShapeTask.java:283)
at edu.southwestern.tasks.NoisyLonerTask.evaluate(NoisyLonerTask.java:126)
at edu.southwestern.evolution.mapelites.MAPElites.newIndividual(MAPElites.java:598)
at edu.southwestern.evolution.mapelites.MAPElites.newIndividual(MAPElites.java:549)
at edu.southwestern.experiment.evolution.SteadyStateExperiment$1.run(SteadyStateExperiment.java:51)
Experiment finished
done: 173.65365 minutes
This happened.
Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 4113 at java.util.Vector.get(Unknown Source) at edu.southwestern.evolution.mapelites.Archive.getElite(Archive.java:296) at edu.southwestern.evolution.mapelites.Archive.getBinScore(Archive.java:306) at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.placeArchiveInWorld(MinecraftLonerShapeTask.java:313) at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.placeArchiveInWorld(MinecraftLonerShapeTask.java:298) at edu.southwestern.tasks.evocraft.MinecraftLonerShapeTask.oneEval(MinecraftLonerShapeTask.java:283) at edu.southwestern.tasks.NoisyLonerTask.evaluate(NoisyLonerTask.java:126) at edu.southwestern.evolution.mapelites.MAPElites.newIndividual(MAPElites.java:598) at edu.southwestern.evolution.mapelites.MAPElites.newIndividual(MAPElites.java:549) at edu.southwestern.experiment.evolution.SteadyStateExperiment$1.run(SteadyStateExperiment.java:51) Experiment finished done: 5161.414433333333 minutes
Issue is still not resolved
I ran three tests with this, and they all crashed at different times/ indexes. One crashed at index 4133 (as seen above), one at 4197, and the other at 4163. I believe either the amount of bins needs to be calculated a different way, or we may need to discard shapes with too many pistons (as a shape made of only pistons won't fly anyway.
I think this works. We've made changes to account for possible array bounds errors, and so far I'm not noticing a return of the error. We'll keep an eye on it.
We know that piston orientation is the main factor influencing the direction something moves. This binning scheme can break things down into three dimensions:
Note that pistons should also include sticky pistons. As with most binning schemes, you will need to define fitness functions to calculate the scores. Make one fitness function that counts pistons (of both types) with a specified orientation (orientation specified at construction), then the three child classes can simply provide different orientation combos to the constructor.
For each axis, the numbers should be allows to be 0, 1, 2, 3, 4, 5 or more. That puts the archive size at 36, which I think is reasonable.