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

Integer based encoding #886

Closed schrum2 closed 1 year ago

schrum2 commented 1 year ago

We currently rely on these settings in all experiments:

minecraftShapeGenerator:edu.southwestern.tasks.evocraft.shapegeneration.VectorToVolumeGenerator
genotype:edu.southwestern.evolution.genotypes.BoundedRealValuedGenotype

However, the real-valued genotypes seem limited. Rather than evolve a list of floating point values (ArrayList<Double>), we could evolve a list of integers (ArrayList<Integer>). The genotype:edu.southwestern.evolution.genotypes.BoundedIntegerValuedGenotype already exists, which could in theory support this, but it's not a simple matter of changing the genotype setting in the batch file. A lot of code has to be written.

A brand new minecraftShapeGenerator will be needed, let's call it edu.southwestern.tasks.evocraft.shapegeneration.IntegersToVolumeGenerator. We also have a lot of details to decide on, but we should start simple.

First, we just want the code to be able to run and generate shapes. So, in the first prototype, let there be exactly one integer in the genotype for each block. That integer will be an index in the block set (ranging from 0 up to the number of blocks minus 1). Don't have support for empty space or different block orientations yet.

I suspect that we will have a problem specifying the upper and lower integer bounds of the genotypes. There is a lot of infrastructure in the code that helps provide upper/lower real-valued bounds, but I don't think any of that exists for upper/lower integer bounds. It probably has to be added.

schrum2 commented 1 year ago

Is able to evolve shapes where every slot holds a block and has same orientation. Need to add support for blocks that are missing (AIR blocks) and also for different orientation.

There are different possible ways of doing this, and I'm still considering what would work best.

schrum2 commented 1 year ago

The simplest way to proceed is to stay as similar to the real-valued vector to volume generator. What this means is the following:

If appropriate command line parameters are set (the same ones used in VectorToVolume), then you can have multiple numbers in the genotype that influence one block. At most, 3 per block. There can be a block for presence which takes on a value of either 0 or 1, and a block for orientation, which takes on an index within the array of possible orientations.

This means that the range of possible values (max values) differ from index to index.

schrum2 commented 1 year ago

Make a batch file directory that runs experiments from GECCO, but using the new integer based encoding. Only make batch files for the experiments using the observer block set. That will be 4 batch files.

schrum2 commented 1 year ago

After running each of the batch files from Experiments-2023-MinecraftInteger to completion, report on results and close this issue.

TjRaffert commented 1 year ago

I ran integer-based encoding with the GECCO batch files. CountNegative and Piston Orientation were able to generate flying machines. ESObserver and count did not which is to be expected.