MATLAB Answers

Deep Q-network reinforcement learning

8 views (last 30 days)
Using the rl agent provided by Matlab, How can I change the action set after each step or episode? Because I assume that the action cannot be repetitive.

  0 Comments

Sign in to comment.

Accepted Answer

Emmanouil Tzorakoleftherakis
Hello,
The functionality to customize the action space is not yet available. A couple of workarounds:
1) Use penalties in the reward signal every time a repetitive action is selected. Make sure you use the previously selected action as an observation here. This may work but if the number of possible actions is small, it may interfere with exploration
2) Use a custom agent following the template guidelines here and here. You can subclass the provided DQN agent and set exploration and action selection as needed for your application.

  2 Comments

Zhengcheng Dong
Zhengcheng Dong on 18 Sep 2020
Thank you for your answer and helpful suggestions.We tried your first method, and it seems to converge very slowly. We are now trying to creat a custom agent. Thank you again.
Emmanouil Tzorakoleftherakis
Happy to help. Here is another page that just went live with 20b release that should be helpful.

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!