MATLAB Answers

reinforcement learning toolbox - q table

21 views (last 30 days)
I'm a newbie to RL and the RL toolbox. I played with Q-learning agent with a model in simulink. My question is after training, How can I access to the trained Q table? The qTable used to generate the agent is all ZERO. I cannot figure out where the trained Q values and the policies are stored. Thank you!

  0 Comments

Sign in to comment.

Accepted Answer

Emmanouil Tzorakoleftherakis
Hi Xinpeng,
To see the trained table, you have to do is extract it using ‘getCritic’. Try:
critic = getCritic(agent);
The variable ‘critic’ has a field which contains the Qtable after training.

  0 Comments

Sign in to comment.

More Answers (3)

carlos pedreira
carlos pedreira on 13 Jan 2020
OK, but, after that, HOW CAN I SEE the table....

  0 Comments

Sign in to comment.


Shikhar Sharma
Shikhar Sharma on 24 Jan 2020
It should appear under the Workspace tab.

  0 Comments

Sign in to comment.


Umut Can Akdag
Umut Can Akdag on 18 May 2020
For those who are still looking for the q table I think this is the solution.
critic = getCritic(agent);
qtable = getLearnableParameters(critic);

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by