Skip to content

Commit

Permalink
polish(pu): polish hyper-parameters in ptz_pistonball_qmix_config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
puyuan1996 committed Nov 21, 2024
1 parent b4b7029 commit ffec133
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions dizoo/petting_zoo/config/ptz_pistonball_qmix_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
evaluator_env_num = 8

main_config = dict(
exp_name=f'data_pistonball/ptz_pistonball_n{n_pistons}_qmix_reward-norm_nsample16_H5_rbs1e3_seed0',
exp_name=f'data_pistonball/ptz_pistonball_n{n_pistons}_qmix_nsample16_H5_reward-norm/20*50_grad-clip-20_upc20_bs32_rbs2e3_seed0',
env=dict(
env_family='butterfly',
env_id='pistonball_v6',
Expand All @@ -32,10 +32,12 @@
mixer=True,
),
learn=dict(
update_per_collect=50,
update_per_collect=20,
# update_per_collect=100,
batch_size=16,
# batch_size=16,
batch_size=32,
learning_rate=0.0001,
clip_value=20,
target_update_theta=0.001,
discount_factor=0.99,
double_q=True,
Expand All @@ -54,7 +56,8 @@
decay=100000,
),
replay_buffer=dict(
replay_buffer_size=1000,
replay_buffer_size=2000,
# replay_buffer_size=5000,
),
),
),
Expand Down
3 changes: 2 additions & 1 deletion dizoo/petting_zoo/envs/petting_zoo_pistonball_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def step(self, action: np.ndarray) -> BaseEnvTimestep:
rew_n = rew_n.astype(np.float32)

if self.normalize_reward:
rew_n = rew_n / self._num_pistons
# TODO: more elegent scale factor
rew_n = rew_n / (self._num_pistons*50)

self._eval_episode_return += rew_n.item()

Expand Down

0 comments on commit ffec133

Please sign in to comment.