Why fixed values are not working in randomstart function of trainDDPGrobot program?
I am new to reinforcement learning and have run the programs given in online ramp course of reinforcement learning. In the randomstart function I made only a single change as given in the code below but the program is giving the attached image. I have seen the documentation, where all examples are given with random numbers. But I all inputvariables i.e. x0, y0, theta0, v0, and w0 to be fix and should be picked from already stored vectors, When I tried to fix only with single variable x0, the program is generating an error. How can I fix it?
function in = randomstart(in)
mdl = "whrobot";
a=0.5;
% in = setVariable(in,"x0",((-1)^randi([0 1]))*(2.5 + 3.5*rand),"Workspace",mdl);
in = setVariable(in,"x0",a,"Workspace",mdl);
in = setVariable(in,"y0",2.6 + 3.4*rand,"Workspace",mdl);
in = setVariable(in,"theta0",pi*(2*rand-1),"Workspace",mdl);
in = setVariable(in,"v0",randn/3,"Workspace",mdl);
in = setVariable(in,"w0",randn/3,"Workspace",mdl);
disp(x0)
endI am new to reinforcement learning and have run the programs given in online ramp course of reinforcement learning. In the randomstart function I made only a single change as given in the code below but the program is giving the attached image. I have seen the documentation, where all examples are given with random numbers. But I all inputvariables i.e. x0, y0, theta0, v0, and w0 to be fix and should be picked from already stored vectors, When I tried to fix only with single variable x0, the program is generating an error. How can I fix it?
function in = randomstart(in)
mdl = "whrobot";
a=0.5;
% in = setVariable(in,"x0",((-1)^randi([0 1]))*(2.5 + 3.5*rand),"Workspace",mdl);
in = setVariable(in,"x0",a,"Workspace",mdl);
in = setVariable(in,"y0",2.6 + 3.4*rand,"Workspace",mdl);
in = setVariable(in,"theta0",pi*(2*rand-1),"Workspace",mdl);
in = setVariable(in,"v0",randn/3,"Workspace",mdl);
in = setVariable(in,"w0",randn/3,"Workspace",mdl);
disp(x0)
end I am new to reinforcement learning and have run the programs given in online ramp course of reinforcement learning. In the randomstart function I made only a single change as given in the code below but the program is giving the attached image. I have seen the documentation, where all examples are given with random numbers. But I all inputvariables i.e. x0, y0, theta0, v0, and w0 to be fix and should be picked from already stored vectors, When I tried to fix only with single variable x0, the program is generating an error. How can I fix it?
function in = randomstart(in)
mdl = "whrobot";
a=0.5;
% in = setVariable(in,"x0",((-1)^randi([0 1]))*(2.5 + 3.5*rand),"Workspace",mdl);
in = setVariable(in,"x0",a,"Workspace",mdl);
in = setVariable(in,"y0",2.6 + 3.4*rand,"Workspace",mdl);
in = setVariable(in,"theta0",pi*(2*rand-1),"Workspace",mdl);
in = setVariable(in,"v0",randn/3,"Workspace",mdl);
in = setVariable(in,"w0",randn/3,"Workspace",mdl);
disp(x0)
end reinforcement learning, input, env MATLAB Answers — New Questions