alistairmcleay commited on
Commit
7771dff
1 Parent(s): 8a1bda8

Fix bug in US where goals werent updating

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -68,6 +68,7 @@ def reset_self_play_state():
68
 
69
  def change_goal():
70
  global curr_goal_idx
 
71
  curr_goal_idx = random.randint(0, n_goals - 1)
72
  current_goal = goals[curr_goal_idx]
73
  us_history = reset_us_state()
@@ -77,6 +78,7 @@ def change_goal():
77
 
78
  def change_sp_goal():
79
  global curr_sp_goal_idx
 
80
  curr_sp_goal_idx = random.randint(0, n_goals - 1)
81
  current_sp_goal = goals[curr_sp_goal_idx]
82
  self_play_history = reset_self_play_state()
 
68
 
69
  def change_goal():
70
  global curr_goal_idx
71
+ global current_goal
72
  curr_goal_idx = random.randint(0, n_goals - 1)
73
  current_goal = goals[curr_goal_idx]
74
  us_history = reset_us_state()
 
78
 
79
  def change_sp_goal():
80
  global curr_sp_goal_idx
81
+ global current_sp_goal
82
  curr_sp_goal_idx = random.randint(0, n_goals - 1)
83
  current_sp_goal = goals[curr_sp_goal_idx]
84
  self_play_history = reset_self_play_state()