Skip to content

Commit

Permalink
[BugFix] Fix discrete SAC (#40)
Browse files Browse the repository at this point in the history
* Amend

* empty

* Amend
  • Loading branch information
matteobettini authored Dec 21, 2023
1 parent 492d1c6 commit 75bc507
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/unittest/install_smacv2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ mkdir "${map_dir}/SMAC_Maps"
mv *.SC2Map "${map_dir}/SMAC_Maps"
printf "StarCraft II and SMAC are installed."

pip install numpy==1.23.0
pip install git+https://github.com/oxwhirl/smacv2.git
1 change: 1 addition & 0 deletions benchmarl/algorithms/isac.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ def _get_policy_for_loss(
"logits": (group, "logits"),
"mask": (group, "action_mask"),
},
distribution_kwargs={"neg_inf": -18.0},
out_keys=[(group, "action")],
distribution_class=MaskedCategorical,
return_log_prob=True,
Expand Down
1 change: 1 addition & 0 deletions benchmarl/algorithms/masac.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def _get_policy_for_loss(
"mask": (group, "action_mask"),
},
out_keys=[(group, "action")],
distribution_kwargs={"neg_inf": -18.0},
distribution_class=MaskedCategorical,
return_log_prob=True,
log_prob_key=(group, "log_prob"),
Expand Down

0 comments on commit 75bc507

Please sign in to comment.