Running the package “Quanser QUBE-Servo 2 Pendulum Control Reinforcement Learning” causes an error when extracting the policy from the agent

10 Ansichten (letzte 30 Tage)
I downloaded and ran the “Quanser QUBE-Servo 2 Pendulum Control Reinforcement Learning” package.
Learning was successful, but an error occurred in the part where the policy is extracted from the agent.
The error is that the policy is missing.
In the meantime, I would like you to download this package and try it out.
And please let me know how to solve this error.
We look forward to hearing from you!
Quanser QUBE-Servo 2 Pendulum Control Reinforcement Learning
バージョン 1.0.3 (1.63 MB) 作成者: Quanser
Shows how to design a reinforcement learning agent to balance the Quanser QUBE-Servo 2 Inverted Pendulum.
% Load pre-defined policy (false) or generate new policy for RT code gen (true)
% doPolicy = false;
doPolicy = true;
%
if doPolicy
% Generate policy for deployment
generatePolicyFunction(agent,'MATFileName','QubeIPBalRLPolicy.mat');
load("QubeIPBalRLPolicy.mat");
policy = cut_unnecessary_layers_for_SAC_policy(policy);
save("QubeIPBalRLPolicy.mat", 'policy');
else
% Load previously saved policy
load("QubeIPBalRLPolicy.mat");
end

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by