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

Accumulate Different History Readings #881

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

Make a new fitness function that extends the timed evaluation fitness, and calculates the final score by looking at successive entries in the history, and doing a difference operation. In other words, for each position in the shape, if the block in the history is different from one reading to the next, add 1 to a counter. The total fitness is the value of the counter. So, more change equals higher fitness.

schrum2 commented 1 year ago

ChangeBlocksFitness needs testing with a batch file. Test it out with 5x5x5 shapes.

schrum2 commented 1 year ago

Try this with 3x3x3 instead to see if it can at least make flying machines in this case.

There is also a possibility that actual flying machines would not earn a high fitness score, so we probably need to add a way to detect the flying machines. I'll make another issue for this.

schrum2 commented 1 year ago

It sounds like rather than saving flying machines specifically, we will grant each fitness function a method of saving whatever type of shapes it finds interesting. In many cases, this will mean flying machines, but it allows for more generality. The work is being done in issue #895, but once a general framework exists, this function needs a way of saving in special cases too.

In the meantime, @TjRaffert still needs to run this with 3x3x3 shapes. It might be time to set up another lab machine

schrum2 commented 1 year ago

This fitness function needs to have a way of determining when we have discovered a flying machine.

@TjRaffert has already run some unit tests #907

The information from those tests regarding the fitness ranges that seem to correspond to flying machines should be reported here as an initial step, before brainstorming ways to identify the machines in code.

TjRaffert commented 1 year ago

I reported on this in #907. But for the 3x3x3 MomentumChangeBlocks Oscillating got 80 and I believe flying machines got 140. The oscillating machines in 5x5x5 got close to 200. I couldn't tell if it got flying machines or not. I am a little worried about a large shape that has multiple oscillating chunks could maybe score higher than a shape that shoots off a small flying machine with no other movement. Would increasing the evaluation time maybe help make the scores more distinct because of how the Momentum setting is calculated?

schrum2 commented 1 year ago

So, I'm not sure if I assigned this in a different issue, or is what I'm about to say is an idea I had that is related to, but different from this one. However, I think we should have either a new fitness function, or a variation on an existing fitness function, that adds all block coordinates witnessed in the history to a set, and then defines the fitness as the size of that set at the end of evaluation. Such a fitness would reward a shape for visiting lots of different block coordinates, which would reward oscillating shapes more than ones that are still, but less than flying machines (since oscillating machines repeatedly visit the same locations, their fitness would stop increasing eventually)

It's probably best to make this a new fitness function, but check through all of your issues to make sure I haven't actually assigned this already.

schrum2 commented 1 year ago

897 is what I was describing in the previous post to this thread. I'm going to close this issue.