Why fixed values are not working in randomstart function of trainDDPGrobot program?
Afficher commentaires plus anciens
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 error shown in the attached image. I have seen the documentation of environment reset function, where all examples are given with random numbers. But I want all input variables i.e. x0, y0, theta0, v0, and w0 to be fix and should be picked from the already stored vectors, When I tried with a constant value of only a single variable x0 (given in line#3 of the program given below), the program is generating an error. Line # 4 in the program given below was the one in the original program (% now), while I have added line # 5 in its replacement, which is not working. 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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!