class_docstr: Q-learning agent.
  
  Including:
  - DQN https://storage.googleapis.com/deepmind-media/dqn/DQNNaturePaper.pdf
  - Prioritized Experience Replay https://arxiv.org/pdf/1511.05952.pdf
  - Dueling Network https://arxiv.org/pdf/1511.06581.pdf
  - Double Q Learning https://arxiv.org/pdf/1509.06461.pdf
class_docstr_tok: ["Q-learning","agent",".","Including",":","-","DQN","https",":","\/\/storage.googleapis.com\/deepmind-media\/dqn\/DQNNaturePaper.pdf","-","Prioritized","Experience","Replay","https",":","\/\/arxiv.org\/pdf\/1511.05952.pdf","-","Dueling","Network","https",":","\/\/arxiv.org\/pdf\/1511.06581.pdf","-","Double","Q","Learning","https",":","\/\/arxiv.org\/pdf\/1509.06461.pdf"]
docstr: Evaluate Q[state, action].
  
  If action is None, return values for all actions.
  Args:
      state (object): observation seen by agent, which can be different
          from what is provided by the environment. The difference comes
          from preprcessing.
      action (int): action choosen by agent.
docstr_tok: ["Evaluate","Q","[","state",",","action","]",".","If","action","is","None",",","return","values","for","all","actions",".","Args",":","state","(","object",")",":","observation","seen","by","agent",",","which","can","be","different","from","what","is","provided","by","the","environment",".","The","difference","comes","from","preprcessing",".","action","(","int",")",":","action","choosen","by","agent","."]
code: def _evaluate_q(self, model, state, action=None):
      """
      Evaluate Q[state, action].
  
      If action is None, return values for all actions.
      Args:
          state (object): observation seen by agent, which can be different
              from what is provided by the environment. The difference comes
              from preprcessing.
          action (int): action choosen by agent.
      """
      q = np.squeeze(model.eval({model.arguments[0]: [state]}))
      if action is None:
          return q
      else:
          return q[action]
  
imports: import math
  import cntk
  import numpy
  import ast
  from .agent import AgentBaseClass
  from .shared.cntk_utils import huber_loss
  from .shared.models import Models
  from .shared.qlearning_parameters import QLearningParameters
  from .shared.replay_memory import ReplayMemory
label_desc: Use image node_id 12 for calling the QLearning obj's underlying member method code with example usage: obj._evaluate_q(model, state, action) and returns: q, q