Skip to content

Commit

Permalink
add script for training qmix or mqmix
Browse files Browse the repository at this point in the history
  • Loading branch information
luoming3 committed Mar 15, 2024
1 parent 8598721 commit 12ebe0e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
14 changes: 7 additions & 7 deletions offpolicy/scripts/train_custom_qmix.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh
env="custom"
scenario="shared"
env="car"
scenario="shared_7a"
num_landmarks=3
num_agents=4
algo="mqmix"
exp="luoming"
exp="el1024_bas32_nr16_use_per"
seed_max=1

current_dir=$(cd $(dirname $0); pwd)
Expand All @@ -15,9 +15,9 @@ for seed in $(seq ${seed_max}); do
echo "seed is ${seed}:"
CUDA_VISIBLE_DEVICES=7 python -u ${current_dir}/train/train_custom.py \
--env_name ${env} --algorithm_name ${algo} --experiment_name ${exp} --scenario_name ${scenario} \
--num_agents ${num_agents} --num_landmarks ${num_landmarks} --seed ${seed} --episode_length 2048 \
--batch_size 32 --lr 7e-4 --hard_update_interval_episode 100 --num_env_steps 100000000 \
--n_rollout_threads 16 --buffer_size 10000 --save_interval 50000 --epsilon_anneal_time 50000 \
--train_interval 100 --use_reward_normalization --use_wandb --cuda
--num_agents ${num_agents} --num_landmarks ${num_landmarks} --seed ${seed} --episode_length 1024 \
--batch_size 128 --lr 5e-4 --num_env_steps 300000000 \
--n_rollout_threads 16 --buffer_size 10000 --save_interval 50000 --epsilon_anneal_time 500000 \
--train_interval 256 --num_eval_episodes 1 --use_wandb --cuda --use_per
echo "training is done!"
done
23 changes: 23 additions & 0 deletions offpolicy/scripts/train_custom_qmix_rnn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh
env="custom"
scenario="shared_7a"
num_landmarks=3
num_agents=4
algo="qmix"
exp="el1024_bas32"
seed_max=1

current_dir=$(cd $(dirname $0); pwd)

echo "env is ${env}, scenario is ${scenario}, algo is ${algo}, exp is ${exp}, max seed is ${seed_max}"

for seed in $(seq ${seed_max}); do
echo "seed is ${seed}:"
CUDA_VISIBLE_DEVICES=7 python -u ${current_dir}/train/train_custom.py \
--env_name ${env} --algorithm_name ${algo} --experiment_name ${exp} --scenario_name ${scenario} \
--num_agents ${num_agents} --num_landmarks ${num_landmarks} --seed ${seed} --episode_length 1024 \
--batch_size 32 --lr 5e-4 --num_env_steps 300000000 \
--n_rollout_threads 1 --buffer_size 5000 --save_interval 50000 --epsilon_anneal_time 500000 \
--train_interval_episode 1 --num_eval_episodes 1 --use_wandb
echo "training is done!"
done

0 comments on commit 12ebe0e

Please sign in to comment.