Replace RL type (PPO with DPPG) in a Matlab example
10 次查看(过去 30 天)
显示 更早的评论
There is a Matlab example about coverage path planning using PPO reinforcement learning in the following link:
I think the environment is fine and I only need to check the parts that there is a PPO. I am trying to replace PPO with DDPG, with the following codes
opt = rlDDPGAgentOptions(...
ActorOptimizerOptions=actorOpts,...
CriticOptimizerOptions=criticOpts,....
MiniBatchSize=64,...
SampleTime=Ts,...
DiscountFactor=0.995);
agentA = rlDDPGAgent(actor(1),critic(1),opt);
agentB = rlDDPGAgent(actor(2),critic(2),opt);
agentC = rlDDPGAgent(actor(3),critic(3),opt);
but there is error: First argument must be a rlDeterministicActorRepresentation object or an observation specification created using 'rlNumericSpec' or 'rlFiniteSetSpec' objects.
Do you have any idea?
0 个评论
采纳的回答
Emmanouil Tzorakoleftherakis
2023-6-27
PPO is a stochastic agent whereas DDPG is deterministic. This means that you cannot just use actors and critics designed for PPO with DDPG and vice versa. Your best bet is to either recreate those neural nets or use the default agent feature to get an initial architecture you can iterate upon.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!