Closed MuellMark closed 2 years ago
Make the save location be a subdirectory named "archive" that is inside of the directory defined by the BASE_DIR, EXPERIMENT_PREFIX, and the RANDOM_SEED.
The files are saved with pickle and are saved in directories based on BASE_DIR, EXPERIMENT_PREFIX, and the RANDOM_SEED. They are saved as "shape#" where # is the counter for how many shapes there are saved total. To load them, the directory is located and then all of the shape files in the directory "archive" are added into a list and then generated. There were some other small things that changed here, such as giving fitness functions its own parameter. On top of this, all generated shapes are cleared with all_blocks (similar to how it is done in fitness_functions). For loading, all blocks are added to one big list, which is returned, and then cleared with a user input. This takes care of rouge snakes that get generated but not cleared with our current clear function
Below are some images from the gallery of novel shapes
While novelty search is working, there isn't a way of saving or loading any of the generated shapes. However, because of how novelty search is, we want to be able to save and load the shapes in the archive as they are generated. The best was to do this is to save each shape individually as they are added to the archive. This way, even when the program is terminated, we have the archive that was slowly built up. Loading the archives will have to reflect this change too.