Skip to content

Commit

Permalink
new experiment on knut-cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
sverrejb committed Apr 4, 2017
1 parent e7fac00 commit c496396
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions EA/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

POPSIZE = 10
DECKSIZE = 40
CROSSOVER_RATE = 0.7
MUTATION_RATE = 0.5
CROSSOVER_RATE = 0.5
MUTATION_RATE = 0.2
NUMBER_OF_GENERATIONS = 200
MATCHES_PER_OPPONENT = '50' # must be string!
CARD_POOL = read_card_pool('../AER-pool-2.txt')
Expand All @@ -18,5 +18,5 @@
"BGw-sealed-opponent.dck", "UR-sealed-opponent.dck", "RW-sealed-opponent.dck"]
EXPERIMENT_TIMESTAMP = datetime.datetime.now().strftime("%d%m%H%M")
EXPERIMENT_FOLDER = "results/" + EXPERIMENT_TIMESTAMP
TERMINATION_TRESHOLD = 65
TERMINATION_TRESHOLD = 50
# CARDS = read_cards_json()
1 change: 1 addition & 0 deletions EA/fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ def evaluate_deck_by_wins(individual):
p.wait()
for i in range(len(ct.OPPONENTS)):
wins[i] = (wins[i] / float(number_of_matches)) * 100
wins = [round(x, 2) for x in wins]
return tuple(wins) # MUST BE TUPLE!
2 changes: 1 addition & 1 deletion EA/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from logger import log_experiment
from mail import send_mail

creator.create("FitnessMax", base.Fitness, weights=(1.0,))
creator.create("FitnessMax", base.Fitness, weights=(1.0, 1.0, 1.0, 1.0, 1.0, 1.0))
creator.create("Individual", list, fitness=creator.FitnessMax)


Expand Down

0 comments on commit c496396

Please sign in to comment.