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

Maven Install failures and stalling #946

Closed JoannaBlatt closed 1 year ago

JoannaBlatt commented 1 year ago

The program will stall in the middle of a unit test. This seems to mostly happen with tests associated with ChangeBlocksFitnessTest, MissileFitnessTest, MaximizeVolumeFitnessTest, and ChangeCenterOfMassFitnessTest. It seems like it is stalling during the readCube method. This points to it being an issue where it is overwhelming the server. However, usually when the server is overwhelmed a message would appear somewhere or it would crash.

A number of the unit tests in the above classes have been commented out to help alleviate this issue, but it still seems to pop up frequently enough to make it difficult to finish a full maven install. Because it is inconsistent in which test causes the stall, it is hard to make sure the watch:true setting is on for that particular test. It may be that all of them should have extra tracking and watch set to true, then run the install until the issue happens and it might give some useful information. This would slow down the build time considerably though.

This seems to be associated just with unit tests that involve simulation in the server. It may have something to do with MinecraftServerTestTracker (which currently just tracks the number of fitness unit tests that run the server and prevents the server being reset between them) or there may need to be modifications made to this class to help. Might also be useful to added some buffer or reset the server between these tests where decrementServerTestCount is called in tearDownAfterClass() .

It might also be useful to have more pauses when doing the readCube function.

A lot of unit tests also seem to fail randomly. It may be that the results are highly variable or we may need a better understanding of the results and how they get calculated.

JoannaBlatt commented 1 year ago

after making sure no server is running it stalled on:

TEST: ChangeCenterOfMassFitnessTest: testFlyingRewardSpeed
shortTimeBetweenMinecraftReads = 1000
Pushed up from (-15,1,-20)
Original Blocks: [PISTON at (0,52,0) oriented NORTH, SLIME at (0,52,-1) oriented NORTH, STICKY_PISTON at (0,52,-2) oriented SOUTH, PISTON at (0,52,-3) oriented NORTH, SLIME at (0,52,-5) oriented NORTH, REDSTONE_BLOCK at (0,53,-1) oriented NORTH, REDSTONE_BLOCK at (0,53,-5) oriented NORTH, QUARTZ_BLOCK at (0,53,-2) oriented NORTH]
Evaluate at corner: (-15,19,-20)
Evaluate Blocks: [PISTON at (0,52,0) oriented NORTH, SLIME at (0,52,-1) oriented NORTH, STICKY_PISTON at (0,52,-2) oriented SOUTH, PISTON at (0,52,-3) oriented NORTH, SLIME at (0,52,-5) oriented NORTH, REDSTONE_BLOCK at (0,53,-1) oriented NORTH, REDSTONE_BLOCK at (0,53,-5) oriented NORTH, QUARTZ_BLOCK at (0,53,-2) oriented NORTH]
Block update: [SLIME at (0,52,-6) oriented null, PISTON_EXTENSION at (0,52,-5) oriented null, PISTON_EXTENSION at (0,52,-4) oriented null, PISTON_EXTENSION at (0,52,-3) oriented null, PISTON_EXTENSION at (0,52,-2) oriented null, PISTON at (0,52,-1) oriented null, REDSTONE_BLOCK at (0,53,-6) oriented null, PISTON_EXTENSION at (0,53,-4) oriented null, PISTON_EXTENSION at (0,53,-3) oriented null]
Block update: [SLIME at (0,52,-3) oriented null, PISTON at (0,52,-2) oriented null, REDSTONE_BLOCK at (0,53,-3) oriented null]

When using the delete command it deleted 3 servers

JoannaBlatt commented 1 year ago

Ran again with no server running. Stalled at:

TEST: MissileFitnessTest: testdropTNTFitnessScore
Original Blocks: [TNT at (-25,30,-35) oriented WEST, REDSTONE_BLOCK at (-24,30,-35) oriented EAST]
Evaluate at corner: (-29,27,-38)

Afterwards deleted two servers running

JoannaBlatt commented 1 year ago

Ran a third time, no server up at start. Failed on:

 TEST: MissileFitnessTest: testdropTNTFitnessScore
Original Blocks: [TNT at (-25,30,-35) oriented WEST, REDSTONE_BLOCK at (-24,30,-35) oriented EAST]
Evaluate at corner: (-29,27,-38)

deleted 2 servers (1? did not realize there was a success message to look for so I'm not sure I've been accurate about this)

JoannaBlatt commented 1 year ago

When a server was running the build succeeded. Another try with a server already running had a failure, but did not stall. One test failed, ChangeBlocksFitnessTest testTwoWorkingFlyingMachineSomethingSouth

schrum2 commented 1 year ago

After fixing various small errors described in my commit messages, I was able to get a successful Maven install with a server running in the background. This makes me comfortable with closing this issue.