Skip to content

Commit

Permalink
Update genetic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoFasulo authored Nov 29, 2023
1 parent f322b83 commit e6061aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion genetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import time
import random
import copy
import sys

def cutoff_depth(d):
return lambda game, state, depth: depth > d
Expand Down Expand Up @@ -66,7 +67,7 @@ def create_starting_from_params(alpha, beta, gamma, theta, epsilon, elements=10)
results = []
for pop in population:
alpha0, beta0, gamma0, theta0, epsilon0 = pop
result, turns = play_game(alpha0, beta0, gamma0, theta0, epsilon0, cod, max_moves, name="Luca", team="WHITE", server_ip="127.0.0.1", timeout=60)
result, turns = play_game(alpha0, beta0, gamma0, theta0, epsilon0, cod, max_moves, name="Luca", team=sys.argv[1], server_ip="127.0.0.1", timeout=60)
#If result = 0, white wins
#If result = 1, black wins
#If result = 2, draw
Expand Down

0 comments on commit e6061aa

Please sign in to comment.