From fbf7c9bf615b4ac89737b4689503a274e5213433 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Mon, 24 May 2021 18:14:23 -0400 Subject: [PATCH 1/3] Added save_data attribute. --- EasyGA/attributes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/EasyGA/attributes.py b/EasyGA/attributes.py index 25af5e8..ddd0ac2 100644 --- a/EasyGA/attributes.py +++ b/EasyGA/attributes.py @@ -86,6 +86,7 @@ class Attributes: database: Database = field(default_factory=sql_database.SQL_Database) database_name: str = 'database.db' + save_data: bool = True sql_create_data_structure: str = """ CREATE TABLE IF NOT EXISTS data ( id INTEGER PRIMARY KEY, From 4248739de8b4bc8d33aabaf92bdf2d06bc8dab16 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Mon, 24 May 2021 18:15:49 -0400 Subject: [PATCH 2/3] Implemented save_data flag. --- EasyGA/EasyGA.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EasyGA/EasyGA.py b/EasyGA/EasyGA.py index d204fe2..5c91c5d 100644 --- a/EasyGA/EasyGA.py +++ b/EasyGA/EasyGA.py @@ -93,7 +93,8 @@ class GA(Attributes): self.sort_by_best_fitness() # Save the population to the database - self.save_population() + if self.save_data: + self.save_population() # Adapt the ga if the generation times the adapt rate # passes through an integer value. From 4e4935e4cf97210f78863a1732dfa52c6d2add6a Mon Sep 17 00:00:00 2001 From: Daniel Wilczak <44122838+danielwilczak101@users.noreply.github.com> Date: Tue, 25 May 2021 23:10:40 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 18fa659..2b78c15 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,6 @@ Chromosome - 8 [E][a][s][y][Z][A] / Fitness = 5 Chromosome - 9 [E][a][s][Y][G][A] / Fitness = 5 ``` -![]() ## Issues