%% Create Q Table Critic Representation
% Create an environment interface.

env = rlPredefinedEnv("BasicGridWorld");

% Create a Q-table using the action and observation specifications from the environment.

qTable = rlTable(getObservationInfo(env),getActionInfo(env));

% Create a critic representation based on the Q-table.

critic = rlQValueRepresentation(qTable,getObservationInfo(env),getActionInfo(env))

% You can now use the critic (along with an actor) to create a suitable discrete action and observation space agent.
% Copyright 2019 The MathWorks, Inc.