How can i use A2C with PPO in RLLIB?
mannyv
July 28, 2022, 2:21pm
2
Hi @Seyar_Barez ,
I do not understand exactly what you are asking. Can you clarify?
One can extend Actor-Critic Agent with PPO (Book Foundation of Deep Reinforcement Learning Page 177). How can i do that in RLLIB?
mannyv
July 31, 2022, 12:37am
4
Hi @Seyar_Barez ,
RLlib has both A2C and PPO available for use to train your environment.
If you are looking for an turtorial on how to use RLlib perhaps this will be useful.
@mannyv thanks! i know how to use RLLIB. I would like to use actor-critic agent in combination of ppo.
mannyv
July 31, 2022, 5:50pm
6
@Seyar_Barez ,
I am sorry but I still cannot understand what you are asking. Perhaps you can describe what you are trying to do in more detail than a single sentence.
There is an example in the repo where they show how to use DQN to train for an iteration then switch to PPO and alternate between them. You could set something like that up for A2C and PPO butI do not think that is exactly what you are asking.
"""Example of using a custom training workflow.
Here we create a number of CartPole agents, some of which are trained with
DQN, and some of which are trained with PPO. Both are executed concurrently
via a custom training workflow.
"""
import argparse
import os
import ray
from ray import tune
from ray.rllib.agents import with_common_config
from ray.rllib.agents.trainer import Trainer
from ray.rllib.agents.dqn.dqn import DEFAULT_CONFIG as DQN_CONFIG
from ray.rllib.agents.dqn.dqn_tf_policy import DQNTFPolicy
from ray.rllib.agents.dqn.dqn_torch_policy import DQNTorchPolicy
from ray.rllib.agents.ppo.ppo import DEFAULT_CONFIG as PPO_CONFIG
from ray.rllib.agents.ppo.ppo_tf_policy import PPOTFPolicy
from ray.rllib.agents.ppo.ppo_torch_policy import PPOTorchPolicy
This file has been truncated. show original
1 Like
mannyv
July 31, 2022, 5:57pm
7
@Seyar_Barez ,
The PPO implementation in RLlib is an actor critic algorithm. Is that what you wanted to know?
yes that helps alot thanks!