I did simulation with pendulum in Reinforcement learning.
After that, I would like to find a policy function of the post -learning controller.
In this case, the policy function will be a torque (control function) that outputs the controller to the state (angle and angle speed).
In addition, I want to tailor the state (angle and angular speed) like Qtable.
In this case, which one use GeneratePolicyFunction or Getaction?
Is this method correct? Or is there another way? Also, how can I save the network by using Sac (Soft-Acto-Critic)?
load('k5_simplePendulum.mat','agent');
generatePolicyFunction(agent);
Angle = linspace(-3.14,-4.71,N);
Velocity = linspace(0,-20,N);
State = comvec(Angle,Velocity);
F(:,i) = evaluatePolicy(State(:,1));