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

Fitness Function for Water/Lava Machines #863

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

The reason for issue #862 is that water and lava can combine to make different types of stone in different circumstances. I wonder if by combining these things with a moving machine, we could create structures somehow. At the moment, this whole idea is very vague and unclear. Some searching online might lead to new ideas of what is possible. However, we need some kind of fitness function that will encourage something to happen between water and lava.

At first, I guess we can start simple, and simply have the goal be the creation of as many solid blocks as possible. I'm pretty sure that one of the blocks that can be created by the interaction of water and lava is obsidian (check this). So, we could have a fitness function that tries to maximize the number of obsidian blocks in the evaluation area.

Note: at first glance, it might seem as though you could simply extend the TypeCountFitness the way that NumRedstoneFitness does, but this won't work for two reasons.

So, this new fitness function will need to place the shape in the world, wait some set amount of time (use the "minecraftMandatoryWaitTime" parameter, but change its description to "time in milliseconds for a full evaluation of a simulated Minecraft shape"), and then read the surrounding space, and count the number of Obsidian blocks (anticipate needed to replace Obsidian with some other kind of block and write the code in a general fashion so that this change can be easily made).

JoannaBlatt commented 1 year ago

makes cobblestone

JoannaBlatt commented 1 year ago

if the origin lava block is put out it turns to obsidian

JoannaBlatt commented 1 year ago

minecraftBlockSet:edu.southwestern.tasks.evocraft.blocks.WaterAndLavaBlockSet

We have successfully encouraged the creation of cobblestone blocks.

schrum2 commented 1 year ago

Although some more experiments with this fitness function need to be run, I'm comfortable closing this issue. Further developments can be tracked in the new issue #873