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

Still rewarding max fitness for change in center of mass incorrectly #828

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

This block sequence earned max fitness somehow:

[STICKY_PISTON at (146,8,3) oriented EAST, OBSERVER at (146,8,5) oriented UP, REDSTONE_BLOCK at (146,9,4) oriented SOUTH, STICKY_PISTON at (147,7,3) oriented UP, REDSTONE_BLOCK at (147,8,2) oriented NORTH, SLIME at (147,8,3) oriented SOUTH, PISTON at (147,10,2) oriented WEST, SLIME at (147,10,3) oriented UP, SLIME at (147,10,4) oriented SOUTH, SLIME at (147,10,5) oriented SOUTH, OBSERVER at (148,8,3) oriented EAST, PISTON at (148,9,2) oriented DOWN, PISTON at (148,9,4) oriented SOUTH, PISTON at (148,9,5) oriented EAST, PISTON at (149,7,4) oriented DOWN, PISTON at (149,8,4) oriented NORTH, SLIME at (149,9,3) oriented NORTH]

Watching it in the archive, it does not fly. Need to investigate.

schrum2 commented 2 years ago

Make sure shapes have a chance to move. Some shapes that move are getting 0 fitness before they have a chance to move. This doesn't solve the max fitness problem though.

schrum2 commented 2 years ago

To debug, I'm going to need to wait until max fitness is called and print out a lot of info about the shape/space/area to try and figure it out. In the meantime, I'm running to see how much averaging helps.

schrum2 commented 2 years ago

Found and fixed a case where a single block by itself would earn max fitness.

schrum2 commented 2 years ago

I feel that weird corner cases will keep popping up, but it once again seems that the fitness function works, or at least that it won't inappropriately award max fitness. It might still give something a lower fitness than it deserves, but that is just bad luck. Going to close this for now.