Skip to content

Commit

Permalink
config(nyz): fix masac smac config multi_agent=True bug (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Apr 16, 2024
1 parent 96c4955 commit 1ac9ad5
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 16 deletions.
5 changes: 2 additions & 3 deletions dizoo/smac/config/smac_10m11m_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=132,
Expand All @@ -52,7 +52,6 @@
collect=dict(
env_num=collector_env_num,
n_sample=1600,
unroll_len=1,
),
command=dict(),
eval=dict(
Expand Down Expand Up @@ -88,4 +87,4 @@
if __name__ == '__main__':

from ding.entry import serial_pipeline
serial_pipeline((main_config, create_config), seed=0)
serial_pipeline((main_config, create_config), seed=0, max_env_step=int(1e7))
2 changes: 1 addition & 1 deletion dizoo/smac/config/smac_25m_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=306,
Expand Down
2 changes: 1 addition & 1 deletion dizoo/smac/config/smac_2c64zg_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=404,
Expand Down
4 changes: 2 additions & 2 deletions dizoo/smac/config/smac_3m_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
),
policy=dict(
cuda=True,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=42,
Expand All @@ -41,7 +42,6 @@
learning_rate_q=5e-4,
learning_rate_policy=5e-4,
learning_rate_alpha=5e-4,
ignore_done=False,
target_theta=0.005,
discount_factor=0.99,
alpha=0.2,
Expand All @@ -63,7 +63,7 @@
start=1,
end=0.05,
decay=100000,
), # TODO(pu)
),
replay_buffer=dict(replay_buffer_size=1000000, ),
),
),
Expand Down
2 changes: 1 addition & 1 deletion dizoo/smac/config/smac_3s5z_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
),
policy=dict(
cuda=True,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=150,
Expand All @@ -41,7 +42,6 @@
learning_rate_q=5e-4,
learning_rate_policy=5e-4,
learning_rate_alpha=5e-5,
ignore_done=False,
target_theta=0.005,
discount_factor=0.99,
alpha=0.2,
Expand Down
5 changes: 2 additions & 3 deletions dizoo/smac/config/smac_3s5zvs3s6z_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
stop_value=0.99,
death_mask=True,
special_global_state=special_global_state,
# save_replay_episodes = 1,
manager=dict(
shared_memory=False,
reset_timeout=6000,
),
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=159,
Expand Down Expand Up @@ -89,4 +88,4 @@
if __name__ == '__main__':

from ding.entry import serial_pipeline
serial_pipeline((main_config, create_config), seed=0)
serial_pipeline((main_config, create_config), seed=0, max_env_step=int(1e7))
1 change: 1 addition & 0 deletions dizoo/smac/config/smac_5m6m_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
),
policy=dict(
cuda=True,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=72,
Expand Down
3 changes: 1 addition & 2 deletions dizoo/smac/config/smac_8m9m_masac_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from easydict import EasyDict
from ding.entry import serial_pipeline

agent_num = 8
collector_env_num = 8
Expand Down Expand Up @@ -27,7 +26,7 @@
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=108,
Expand Down
1 change: 1 addition & 0 deletions dizoo/smac/config/smac_MMM2_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
),
policy=dict(
cuda=True,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=204,
Expand Down
1 change: 1 addition & 0 deletions dizoo/smac/config/smac_MMM_masac_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
),
policy=dict(
cuda=True,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=186,
Expand Down
5 changes: 2 additions & 3 deletions dizoo/smac/config/smac_corridor_masac_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from easydict import EasyDict
from ding.entry import serial_pipeline

agent_num = 6
collector_env_num = 8
Expand Down Expand Up @@ -27,7 +26,7 @@
),
policy=dict(
cuda=True,
on_policy=False,
multi_agent=True,
random_collect_size=0,
model=dict(
agent_obs_shape=192,
Expand Down Expand Up @@ -89,4 +88,4 @@
if __name__ == '__main__':

from ding.entry import serial_pipeline
serial_pipeline((main_config, create_config), seed=0)
serial_pipeline((main_config, create_config), seed=0, max_env_step=int(1e7))

0 comments on commit 1ac9ad5

Please sign in to comment.