From df16339eefdbed272d456cc796283663d5ae403b Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Sun, 17 May 2020 11:17:08 +0200 Subject: [PATCH] Changed log paths --- src/AI/GA.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AI/GA.py b/src/AI/GA.py index 659947b..5d2814b 100644 --- a/src/AI/GA.py +++ b/src/AI/GA.py @@ -215,20 +215,20 @@ def pickEntity(player, map): def writeResults(iter, bestFit, bestMember): if iter == 0: # Initialize human-readable log file - with open("results.txt", "w+") as f: + with open("src/AI/resultsExplorer/results.txt", "w+") as f: f.write("GA Results from " + str(datetime.now())) f.write("\n") - with open("resultsRaw.txt", "w+") as f: + with open("src/AI/resultsExplorer/resultsRaw.txt", "w+") as f: f.write("=HEADER=GA=\n") - with open("results.txt", "a") as f: + with open("src/AI/resultsExplorer/results.txt", "a") as f: f.write("Population: {}\n".format(iter)) f.write("Best fitness: {}\n".format(bestFit)) f.write("Best offspring: " + str(bestMember)) f.write("\n\n") # Write raw arrays - with open("resultsRaw.txt", "a") as f: + with open("src/AI/resultsExplorer/resultsRaw.txt", "a") as f: f.write(str(bestMember + [bestFit])) f.write("\n")