Reinforcement Learning toolbox step function

30 views (last 30 days)
Mostafa Nazmi
Mostafa Nazmi on 7 Sep 2020
Commented: Maha Mosalam on 22 Nov 2021
Greetings everyone, I hope you're having a good time. In reinforcement learning toolbox there's a functin named "step(env, Action)", I wanted to know what is the role of the input "Action" in this function?
[Observation, Reward, IsDone, LoggedSignals] = step(env, Action)

Accepted Answer

Stephan on 7 Sep 2020
Edited: Stephan on 7 Sep 2020
The action the agent has choosen in the last step, usually has an impact on the environment. To let the step function know what action was choosen the step before, you have to refer the last action to the next call of the step function, which then - based on this informations calculates the next observation, the reward and the iSDone flag.
See this example:
In the example given in the link above the action is a directed force that is applied to the system in the following step to calculate the new observations from the current step.
Building on that the step function can calculate the reward and if the IsDone value is true. Using these informations the agent gets a new information from the environment, which is the basis for the choice of the next action.
Maha Mosalam
Maha Mosalam on 22 Nov 2021
Hi, what about the xact role of IsDone flag it it shuld be true or false or what?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by