How to check the Q(s,a) value from a trained DQN agent?

I have trained a DQN agent using the new Reinforcement Learning toolbox. And I wonder if it's possible to check the Q value of a certain (s,a) pair?

Answers (1)

Hello Yichen,
You can extract the 'rlQValueRepresentation' critic from the 'rlDQNAgent' using 'getCritic()'. From there you can use 'getValue()' to get the value for the observation. Here are my documentation page references:

Categories

Find more on Reinforcement Learning Toolbox in Help Center and File Exchange

Products

Release

R2019a

Asked:

on 24 Sep 2019

Answered:

on 10 Mar 2021

Community Treasure Hunt

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

Start Hunting!