Skip to content

Commit

Permalink
fix bug: omit last action during evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
tianzikang committed Aug 25, 2022
1 parent 89a4a6d commit 2617bda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,11 @@ def evaluate(self, env, episode_num=32):
for _ in range(episode_num):
eval_ep_rewards = []
done = False
action = None
env.reset()
self.Q.init_eval_rnn_hidden()
while not done:
last_obs = env.get_obs()
last_obs = env.get_obs(action)
avail_actions = env.get_avail_actions()
recent_observations = np.concatenate([np.expand_dims(ob, axis=0) for ob in last_obs], axis=0)
random_selection = np.zeros(self.num_agents).astype(np.bool_)
Expand Down

0 comments on commit 2617bda

Please sign in to comment.