Closed schrum2 closed 5 years ago
Logging works, but should probably save in a subdir and change the save file names
Work on this issue and #31 together. When an experiment starts, create a sub dir with a name like:
2019-07-09-GreenHillZone.Act1-lamarck
The log file already has a similar name. Save the log file
2019-07-09-GreenHillZone.Act1-lamarck-log.txt
In this directory. Currently this file is just saved in the experiment root.
Also in this directory, save the scores from each generation. Currently, the program saved files with names like the following to the root directory:
2019-07-09-GreenHillZone.Act1-lamarck-log.txt.parents.gen0.txt
2019-07-09-GreenHillZone.Act1-lamarck-log.txt.combined.gen0.txt
However, if these files are placed in a subdir with the rest of the files above, they could just have names like
parents.gen0.txt
combined.gen0.txt
A few notes:
replace("\\", "/")
did the trick.--save-interval
value to 1 so as to represent saving for each generation, but the code is set up to work for saving at any given number of generations. --log-interval
does not seem to be used neither in NSGAII.py nor in any of its helpers. I rewrote the main method so that log_scores_and_behaviors
does so at every --save-interval
(since they log to subdirs created only at the specified intervals). Renaming the variable would probably be necessary here.
There needs to be a way to log to text file the complete scores and behavior vectors of every individual after each generation, but this can't really be done properly until #35 is resolved.