schrum2 / EvoCraft-SCOPE

0 stars 0 forks source link

Batch files should save data #67

Closed schrum2 closed 2 years ago

schrum2 commented 2 years ago

All batch files should automatically save as much data as possible for logging purposes. This means saving the population, the fitness plots, and the final champion network, etc.

Also, talk to @MuellMark about making a new batch file for novelty search

alejmedinajr commented 2 years ago

Although this still produces an error when uncommented (due to lack of graphviz) the actual file with the information for the neural network is now being automatically saved by the fitness batch files. It also seems like the interactive batch files save the population whenever you type 's' into the console. I am not sure there is much more to save after that?

alejmedinajr commented 2 years ago

Now there is a batch file for novelty search that automatically saves the archived shapes.

schrum2 commented 2 years ago

Let's not consider this closed until the graphiviz error is fixed. Please explain how to recreate the error and post the complete error trace here.

alejmedinajr commented 2 years ago

The graphviz error is caused by the line (line 206 for me): visualize.draw_net(config, stats.best_genome(), view=True, filename='{}/{}{}/champion_neural_network.gv'.format(args.BASE_DIR, args.EXPERIMENT_PREFIX, args.RANDOM_SEED), node_names=node_names).

This is the line that saves the champion's neural network. It can be recreated with the following command line parameters: --INTERACTIVE_EVOLUTION=False --BASE_DIR=friday --EXPERIMENT_PREFIX=dragonfruit --RANDOM_SEED=58 --FITNESS_FUNCTION=type_count --DESIRED_BLOCK=SLIME --BLOCK_LIST_EVOLVES=False --SAVE_FITNESS_LOG=True --EVOLVE_FITNESS=True

The complete error trace: complete error trace for graphviz

alejmedinajr commented 2 years ago

To avoid the error, a try/except was placed. Since the neural network can be viewed online from the file produced, there is no need to install graphviz. This seems to fix the graphviz problems.