Closed schrum2 closed 2 years ago
The blocks should be placed on the fence corners, but to archive this in general you actually need to use t2
instead of t1
. Basically, t2
minus 1 in both x and z should be one corner, and t2
plus range in x but minus 1 in z should be the other.
We're currently having an issue when a shape is being generated and our separate thread is detecting that the diamond block is missing at the same time. This is calling an assertion that stops the code, but when the command line param is turned off, we aren't having this issue.
There is now a separate thread that is synchronized that reads the positions of the diamonds and emeralds. When a diamond is broken, the shape is clear and regenerated. If the emerald block is broken, the area is cleared, the shape is removed from the archive, and then the triple is removed from the set, in that order. A new method had to be added into archive for removing items. All of this is controlled by a command line parameter, including whether or not the two blocks are even generated (if true, both blocks generated and read, if false, neither occurs.)
I think the user should be able to interact with the MAP Elites archive in the world.
Have each elite that is placed in the world generate a special block (Diamond?) at the corner of the empty space that contains it (at the edge of the space-between area). If the user destroys the diamond block for a given shape, then the shape is regenerated in the world fresh and the diamond block reappears. This can be useful for shapes with moving parts to restore them to their original shape.
Also have each shape place some other kind of block (emerald?) at a different corner. Destroying this block completely deletes the given shape from the archive. This can be done when the user does not link the elite and wants to give the algorithm a chance to make something better. Could be useful to clear out stagnate garbage.
We need to have a separate Java
Thread
that that runs in the background monitoring the status of these diamond and emerald blocks, and responds accordingly. Proper synchronization is also needed, which is something I'll need to teach you about. For now, just start by placing the blocks in the world, and they I'll help later with the multithreading and synchronization.