This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Simple example of setting up a multi-agent policy mapping. | |
Control the number of agents and policies via --num-agents and --num-policies. | |
This works with hundreds of agents and policies, but note that initializing | |
many TF policies will take some time. | |
Also, TF evals might slow down with large numbers of policies. To debug TF | |
execution, set the TF_TIMELINE_DIR environment variable. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import gym | |
import ray | |
from ray.rllib.agents.ppo import PPOTrainer | |
from ray.rllib.examples.env.multi_agent import MultiAgentCartPole | |
from ray.tune import register_env | |
ray.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get transfer learning training data | |
!git clone https://github.com/aditya9898/transfer-learning.git | |
!mv transfer-learning/train train |