Skip to content

Commit

Permalink
Remove test_fn and train_fn as they are not used in PPO PistonBall ex…
Browse files Browse the repository at this point in the history
…ample for PettingZoo (#840)

Specifically, BasePolicy.set_eps seems to be a remnant from using DQN in
other examples.

* Removed unused functions (test_fn and train_fn) from the pettingzoo
example with PistonBall. These functions use set_eps which is not
available for PPO and is not even called once in the file.
  • Loading branch information
Quoding authored Mar 31, 2023
1 parent 7f8fa24 commit 4ac407c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test/pettingzoo/pistonball_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ def save_best_fn(policy):
def stop_fn(mean_rewards):
return False

def train_fn(epoch, env_step):
[agent.set_eps(args.eps_train) for agent in policy.policies.values()]

def test_fn(epoch, env_step):
[agent.set_eps(args.eps_test) for agent in policy.policies.values()]

def reward_metric(rews):
return rews[:, 0]

Expand Down

0 comments on commit 4ac407c

Please sign in to comment.