When using the reinforcement learning toolbox, when training the agent, there will be a problem that action is the boundary.

5 visualizaciones (últimos 30 días)
我在用深matlab强化学习工具箱进行自定义环境智能体训练,在第一次训练时(未得到奖励时),智能体给出的action是action约束范围内的值,然而在第二次训练时(得到第一次训练的奖励后),智能体给出的action是action却是约束范围的边界值?并且从第二次训练到后面第n次的训练也是这样,这是为什么? 我可以给您我的简易代码,您可以帮忙看一下问题出在哪里了吗?
I am using the deep matlab reinforcement learning toolbox to train a custom environment agent. In the first training (when no reward is received), the action given by the agent is a value within the action constraint range. However, in the second training (after receiving the first training reward), the action given by the agent is an action but the boundary value of the constraint range? And the same is true from the second training to the nth subsequent training. Why is this? I can give you my simple code and can you help me see where the problem is?
function[Observation,Reward,IsDone,NextState]=newgoushi(Action,State)
E=State;
%% 奖励
GT=1000*Action(1);
NextState=E-GT;
if GT-E<0.1
Reward=0;
else
Reward=-1;
end
IsDone=Reward>=0;
Observation=NextState ;
end
我的action是一个连续的,约束范围在0-12000之间,我的state也是一个连续的,约束范围在5000-10000之间
My action is continuous, and the constraint range is between 0-12000. My state is also continuous, and the constraint range is between 5000-10000.

Respuestas (0)

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by