Skip to content

Commit

Permalink
Merge branch 'master' into rllib_1.8.0_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Theohhhu committed Jul 31, 2023
2 parents adf046f + eb3d26a commit 34188ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
[![Documentation Status](https://readthedocs.org/projects/marllib/badge/?version=latest)](https://marllib.readthedocs.io/en/latest/)
[![GitHub issues](https://img.shields.io/github/issues/Replicable-MARL/MARLlib)](https://github.com/Replicable-MARL/MARLlib/issues)
[![PyPI version](https://badge.fury.io/py/marllib.svg)](https://badge.fury.io/py/marllib)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Replicable-MARL/MARLlib/blob/rllib_1.8.0_dev/marllib.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Replicable-MARL/MARLlib/blob/master/marllib.ipynb)
[![Organization](https://img.shields.io/badge/Organization-ReLER_RL-blue.svg)](https://github.com/Replicable-MARL/MARLlib)
[![Organization](https://img.shields.io/badge/Organization-PKU_MARL-blue.svg)](https://github.com/Replicable-MARL/MARLlib)
[![Awesome](https://awesome.re/badge.svg)](https://marllib.readthedocs.io/en/latest/resources/awesome.html)
Expand Down Expand Up @@ -359,7 +359,7 @@ MARLlib provides some practical examples for you to refer to.
## Tutorials

Try MPE + MAPPO examples on Google Colaboratory!
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Replicable-MARL/MARLlib/blob/rllib_1.8.0_dev/marllib.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Replicable-MARL/MARLlib/blob/master/marllib.ipynb)
More tutorial documentations are available [here](https://marllib.readthedocs.io/).

## Awesome List
Expand Down
2 changes: 1 addition & 1 deletion marllib/marl/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def dict_update(target_dict: Dict, new_dict: Dict, check: bool = False) -> Dict:
raise ValueError("{} illegal, not in default config".format(key))
else: # update
target_dict[key] = value
if key in target_dict:
else:
target_dict[key] = value

return target_dict
Expand Down
3 changes: 2 additions & 1 deletion marllib/marl/models/zoo/mlp/base_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def __init__(
self.q_flag = False

self.actors = [self.p_encoder, self.p_branch]
self.critics = [self.vf_encoder, self.vf_branch]
self.actor_initialized_parameters = self.actor_parameters()

@override(TorchModelV2)
Expand Down Expand Up @@ -121,4 +122,4 @@ def actor_parameters(self):
return reduce(lambda x, y: x + y, map(lambda p: list(p.parameters()), self.actors))

def critic_parameters(self):
return list(self.vf_branch.parameters())
return reduce(lambda x, y: x + y, map(lambda p: list(p.parameters()), self.critics))

0 comments on commit 34188ca

Please sign in to comment.