* Bug fix for https://githhub.com/ray-project/ray/issues/8483

We need to pass in a framework explicitly with the new defaults. Further, the actual bug was that policies were being sorted alphabetically in the MADDPG init(), which led to incorrect initialization.

* Linting
This commit is contained in:
Tanay Wakhare
2020-06-30 00:27:32 -07:00
committed by GitHub
parent 0d37103f84
commit efcee9f1de
2 changed files with 9 additions and 4 deletions
+3
View File
@@ -23,6 +23,9 @@ logger.setLevel(logging.INFO)
# yapf: disable
# __sphinx_doc_begin__
DEFAULT_CONFIG = with_common_config({
# === Framework to run the algorithm ===
"framework": "tf",
# === Settings for each individual policy ===
# ID of the agent controlled by this policy
"agent_id": None,
+6 -4
View File
@@ -74,12 +74,14 @@ class MADDPGTFPolicy(MADDPGPostprocessing, TFPolicy):
"Space {} is not supported.".format(space))
obs_space_n = [
_make_continuous_space(space) for _, (_, space, _, _) in
sorted(config["multiagent"]["policies"].items())
_make_continuous_space(space)
for _, (_, space, _,
_) in config["multiagent"]["policies"].items()
]
act_space_n = [
_make_continuous_space(space) for _, (_, _, space, _) in
sorted(config["multiagent"]["policies"].items())
_make_continuous_space(space)
for _, (_, _, space,
_) in config["multiagent"]["policies"].items()
]
# _____ Placeholders