schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

Novelty characterizations based on block type #64

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

Clearly, the types of blocks relate to the novelty as well as the shape. However, it's hard to think of a good characterization that would not also require changing the distance calculation ... but maybe that is what we should do. Let's brainstorm before filling out this issue more.

MuellMark commented 2 years ago

We discussed a few different options for doing a characterization based around the block types, one of which was 1-hot encoding, which could work, but would get very messy when we incorporate all of the undroppable block types. A more reasonable approach would be to modify the hamming distance so that we add 1 if one vector has a block and the other has air, or ,05 if there are two blocks that are different. (Mentioned in #65) This would reward diversity in block types, but not as much as it would if there was a difference in the block existing or not. Another possible characteristic we could add would be looking only at the composition of the shapes, such as the percentage of the blocks that make up the shape. This would ignore the shape entirely, but could still be beneficial

MuellMark commented 2 years ago

There are now 2 new characterizations, one that creates a list of all of the block types present in the shape (like the presence characteristic, but with the block id number). The other one returns a list with the length of the possible block set, where each cell has the percentage of that block in the shape. Both of these were tested with the unit tests made in #70 , which verified that they work. These each also work with the distance metrics, although some aren't as beneficial as others (such as the Euclidean distance with the composition characteristic).