Skip to content

Commit

Permalink
Changed primary move vs. secondary move scoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bcorfman committed May 23, 2015
1 parent a1083a5 commit 7cce75c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions goalformation.py
Expand Up @@ -53,15 +53,14 @@ def calc_best_move(formation, owner, term_event, child_conn):
primary_move, primary_score = None, 999
if primary:
primary_move, primary_score = argmin_score(primary, score_func)
primary_score -= 3 # bonus for primary moves since they are within the formation
primary_score -= 1 # bonus for primary moves since they are within the formation
secondary_move, secondary_score = None, 0
if secondary:
secondary_move, secondary_score = argmin_score(secondary, score_func)
if term_event.is_set(): # a signal means terminate
term_event.clear()
child_conn.send(None)
return
print primary_move, secondary_move, primary_score, secondary_score
move = primary_move if primary_score <= secondary_score else secondary_move
child_conn.send(move)

Expand Down

0 comments on commit 7cce75c

Please sign in to comment.