Skip to content

Commit

Permalink
add vdac map
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhangliu committed Nov 4, 2023
1 parent c0edf0f commit c9478e1
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 9 deletions.
68 changes: 68 additions & 0 deletions xuance/configs/vdac/sc2/1c3s5z.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
agent: "VDAC"
env_name: "StarCraft2"
env_id: "1c3s5z"
fps: 15
policy: "Categorical_MAAC_Policy_Share"
representation: "Basic_RNN"
vectorize: "Subproc_StarCraft2"
runner: "StarCraft2_Runner"

# recurrent settings for Basic_RNN representation
use_recurrent: True
rnn: "GRU"
recurrent_layer_N: 1
fc_hidden_sizes: [64, ]
recurrent_hidden_size: 64
N_recurrent_layers: 1
dropout: 0
normalize: "LayerNorm"
initialize: "orthogonal"
gain: 0.01

actor_hidden_size: []
critic_hidden_size: []
activation: "ReLU"

mixer: "QMIX" # choices: VDN (sum), QMIX (monotonic)
hidden_dim_mixing_net: 32 # hidden units of mixing network
hidden_dim_hyper_net: 64 # hidden units of hyper network

seed: 1
parallels: 8
n_size: 8
n_epoch: 1
n_minibatch: 1
learning_rate: 0.0007 # 7e-4
weight_decay: 0

vf_coef: 1.0
ent_coef: 0.01
target_kl: 0.25
clip_range: 0.2
clip_type: 1 # Gradient clip for Mindspore: 0: ms.ops.clip_by_value; 1: ms.nn.ClipByNorm()
gamma: 0.99 # discount factor

# tricks
use_linear_lr_decay: False # if use linear learning rate decay
end_factor_lr_decay: 0.5
use_grad_norm: True # gradient normalization
max_grad_norm: 10.0
use_value_clip: True # limit the value range
value_clip_range: 0.2
use_value_norm: True # use running mean and std to normalize rewards.
use_huber_loss: True # True: use huber loss; False: use MSE loss.
huber_delta: 10.0
use_advnorm: True # use advantage normalization.
use_gae: True # use GAE trick to calculate returns.
gae_lambda: 0.95

start_training: 1
running_steps: 2000000
train_per_step: True
training_frequency: 1

test_steps: 10000
eval_interval: 10000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/25m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 5000000 # 5M
training_frequency: 1

eval_interval: 50000
eval_interval: 25000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
4 changes: 2 additions & 2 deletions xuance/configs/vdac/sc2/2m_vs_1z.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ train_per_step: True
training_frequency: 1

test_steps: 10000
eval_interval: 10000
test_episode: 5
eval_interval: 5000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
68 changes: 68 additions & 0 deletions xuance/configs/vdac/sc2/2s3z.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
agent: "VDAC"
env_name: "StarCraft2"
env_id: "2s3z"
fps: 15
policy: "Categorical_MAAC_Policy_Share"
representation: "Basic_RNN"
vectorize: "Subproc_StarCraft2"
runner: "StarCraft2_Runner"

# recurrent settings for Basic_RNN representation
use_recurrent: True
rnn: "GRU"
recurrent_layer_N: 1
fc_hidden_sizes: [64, ]
recurrent_hidden_size: 64
N_recurrent_layers: 1
dropout: 0
normalize: "LayerNorm"
initialize: "orthogonal"
gain: 0.01

actor_hidden_size: []
critic_hidden_size: []
activation: "ReLU"

mixer: "QMIX" # choices: VDN (sum), QMIX (monotonic)
hidden_dim_mixing_net: 32 # hidden units of mixing network
hidden_dim_hyper_net: 64 # hidden units of hyper network

seed: 1
parallels: 8
n_size: 8
n_epoch: 1
n_minibatch: 1
learning_rate: 0.0007 # 7e-4
weight_decay: 0

vf_coef: 1.0
ent_coef: 0.01
target_kl: 0.25
clip_range: 0.2
clip_type: 1 # Gradient clip for Mindspore: 0: ms.ops.clip_by_value; 1: ms.nn.ClipByNorm()
gamma: 0.99 # discount factor

# tricks
use_linear_lr_decay: False # if use linear learning rate decay
end_factor_lr_decay: 0.5
use_grad_norm: True # gradient normalization
max_grad_norm: 10.0
use_value_clip: True # limit the value range
value_clip_range: 0.2
use_value_norm: True # use running mean and std to normalize rewards.
use_huber_loss: True # True: use huber loss; False: use MSE loss.
huber_delta: 10.0
use_advnorm: True # use advantage normalization.
use_gae: True # use GAE trick to calculate returns.
gae_lambda: 0.95

start_training: 1
running_steps: 2000000
train_per_step: True
training_frequency: 1

test_steps: 10000
eval_interval: 10000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/3m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ start_training: 1
running_steps: 1000000
training_frequency: 1

eval_interval: 10000
eval_interval: 5000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/5m_vs_6m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 10000000 # 10M
training_frequency: 1

eval_interval: 100000
eval_interval: 50000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/8m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 1000000 # 1M
training_frequency: 1

eval_interval: 10000
eval_interval: 5000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/8m_vs_9m.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 10000000 # 10M
training_frequency: 1

eval_interval: 100000
eval_interval: 50000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/MMM2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 10000000 # 10M
training_frequency: 1

eval_interval: 100000
eval_interval: 50000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"
2 changes: 1 addition & 1 deletion xuance/configs/vdac/sc2/corridor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ start_training: 1
running_steps: 10000000 # 10M
training_frequency: 1

eval_interval: 100000
eval_interval: 50000
test_episode: 16
log_dir: "./logs/vdac/"
model_dir: "./models/vdac/"

0 comments on commit c9478e1

Please sign in to comment.