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

Problem with call to clearAndVerify #882

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

In TimedEvaluationMinecraftFitnessFunction there is a call to clearAndVerify that takes the wrong version of corner, but when it is corrected to the right version of corner it breaks some unit tests. However, the tests do not fail with a wrong value (at least, not yet), they simply crash because the clear command tries to clear a negative coordinate. The parameter to clearAndVerify should be changed as will be clarified in an upcoming commit, but this will also require fixes to some unit tests that have parameters set wrong.

JoannaBlatt commented 1 year ago

I think the problem is in MinecraftClient , often an evaluation corner is being passed to clearAroundCorner but it uses the shapes corner. This is part of clearAreaAroundSpecialCorner as well. It directly passes the evaluation corner.

JoannaBlatt commented 1 year ago

Added a line to shift the shapeCorner when bounds checking in TimedEvaluationMinecraftFitnessFunction which fixed the out of bounds issue with unit tests.