From 6eb82a0dd436a2e90c30427cba7d3659c05097eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sverre=20Johann=20Bj=C3=B8rke?= Date: Thu, 23 Mar 2017 18:41:47 +0100 Subject: [PATCH] fix derp with string value for matches --- EA/fitness.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EA/fitness.py b/EA/fitness.py index 5d86a67..05169ab 100644 --- a/EA/fitness.py +++ b/EA/fitness.py @@ -12,9 +12,7 @@ def build_cmd(candidate_name, opponent_name, nr_matches): def evaluate_deck_by_wins(individual): - - number_of_matches = len(ct.OPPONENTS) * ct.MATCHES_PER_OPPONENT - + number_of_matches = len(ct.OPPONENTS) * int(ct.MATCHES_PER_OPPONENT) decklist = genome_to_decklist(individual) filename = "candidate.dck" write_decklist(ct.CARD_DIRECTORY + filename, decklist)