How does the RL Agent Simulink Block Internal Mechanism Actually Work?

5 views (last 30 days)
Dear all,
I am currently utilizing Matlab's Reinforcement Learning Toolbox along with Simulink for research purposes. My aim is to model a specific environment, and release the agent into the environment to ultimately help with decision-making. My question is, how does the RL Agent block internal mechanism/algorithm in Simulink actually work? Is it a sort of neural network with layers? Or perhaps a built in model? Because from my inspection, I still do not know how it processes the observation and reward it receives to decide on what action to take.
Thanks in advance and regards,
Aaron.

Accepted Answer

Arkadiy Turevskiy
Arkadiy Turevskiy on 20 Nov 2023
Hi Aaron,
RL Agent block is implemented with a MATLAB object. There are different types of agents avialble. This is explained in this doc page.
The agent will typically have a policy (actor). This would be a neural net, with layers, that maps the obseravtions into actions that the agent takes. If the agent is actor-critic type, the agent also includes the critic - another neural net that scores/judges/evaluates how good the policy is. The critic network is used to adjust parameters of the actor (to provide the actual learning mechanism).
Once you have trained RL agent, you would need only the polcity part -to map the obseravtions into actions. You can extract the policy useing functioanlity described here. You can then deploy the policy using code generation.
HTH.
Arkadiy

More Answers (0)

Community Treasure Hunt

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

Start Hunting!